Some of you might have read my post on Cfdocument Performance. One of the tips in that article is to watch out for external resources. If your HTML is pointing to images or css files (as opposed to "in-line" CSS), cfdocument will have to "go get" those files. The way it does this is important. The server does not does not simply "include" the file (a la cfinclude). Instead, cfdocument impersonates a browser and uses HTTP. This has an impact on how you use Cfdocument. Each cfdocument call has the potential to generate many http requests. Here are the details.Read More
Oh how I love easy questions. Yes Virginia you can do this but only "globally" through the CF Admin. Log into the CF Administrator and click on the "settings" link. There are 3 new settings that apply here. Here's the scoop from the release notes.
Maximum size of post data (MB) - Limits the amount of data that can be posted to the server in a single request. Coldfusion rejects single requests larger than the specified limit. The default value is 100 MB.
Request throttle threshold (MB) - Requests smaller than the specified limit are neither queued nor counted as part of the total memory. Requests larger than the specified limit are counted as part of total memory and are queued if the request throttle memory size has been exceeded. The default value is 4 MB.
In a technote titled Coldfusion Performance Tuning that was last updated on March 7th 2003, the following advice was given regarding the "simultaneous request" setting in the Coldfusion administrator. The writer indicates that this setting has the largest impact on scalability, and then goes on to recommend a setting of 3 times the number of processors as a "starting point". This number has been oft stated as the "rule of thumb". I've heard as 2 to 3 requests per processor and I've often heard the number of 4 to 5 per processor, although I was unable to locate that recommendation in any online documents. I think this baseline recommendation should be changed to as high as 7 to 10 per processor for a CFMX server on a modern server (P4 or Xeon).Read More
When creating complicated web applications you sometimes run into situations where long running requests are necessary. Please don't email me with altruistic best practice jargon. I know they are not a good idea. My point is, that they can be unavoidable in some cases. Consider file upload for example. Suppose you need to allow users to upload more than 1 file in a single request (let's say 5) and suppose the files are typically .5 to 2 Megabytes. Potentially this means a maximum total aggregate of 6 megabytes.Read More
First things first, yes it is fine to delete this file. Make sure you know why it is growing so large - there may be errors you should be concerned about, and this file merits your review. In order to delte the file you will have to stop coldfusion. Upon a restarting Coldfusion will actually recreate the file starting with a nice tidy 1 kilobyte. You might notice that the "event" log actually "rolls over" every 200k. Wouldn't it be nice if the err log did that too? It can...Read More
Would you like to know how to create your own memory leak using the design of the Coldfusion Server to do it? Here's one way. Let's say you have a site that sells products from Narnia. It has a root folder that display your products and prices. You've done a great job of creating friendly links for browsing your Narnia products. You have stuffed Aslan lions both friendly and fearsome, White witch figurines, fauns, nyads, dryads, a toy lamppost and even a wardrobe for sale. Let's say (for the sake of argument) that you have 50 links to Narnia products just on your home page. If a user chooses to buy one of your products he or she clicks on "add to cart". At this point the user is taken into the "/shop/" folder to the page at "www.Nnarniaproducts.com/shop/cart.cfm". So far so good. This is how many online stores are organized and it's just peachy. But let's look under the hood shall we.
Paul Vernon posted an interesting item on CF Talk regarding a memory leak on a Windows 2003 server running SP 1. His contention was that when you log on to a Win3k server that is running Coldfusion using terminal services, then log off again, the memory is not being released from the "winlogon" process. Over time the memory usage builds up into the hundreds of megabytes causing a resource utilization issue. We've seen this as well, although I do not think it has anything to do with Coldfusion. I imagine that other 3rd party server applications would cause the same behavior. In any case, I reviewed his fix and it seems to work splendidly. Here's some more information.Read More
If you are using CMFX and trying to "tune" the JVM - or maybe even just adding a class path, I have some advice for you. Don't use the CF Administrator to do it! Instead, get used to editing the jvm.config file located in cfusionmx7/runtime/bin. Not only will you benefit from gaining a better knowledge of the inner workings of your JVM, but you will also miss out on a ticklish bug that will have you scratching your head in frustration. Here's the scoop.Read More