Trouble with Random Long-Running request in ColdFusion 8

I've been experiencing some run-time weirdness with ColdFusion for the past year or so, and I've finally decided to post my observations and see if anyone else has been having similar troubles.

The trouble shows up on any number of scripts, but is most likely to appear with scripts that are called frequently. The screenshot I've included shows a Slow Request report from the ColdFusion Server Monitor. You can see that this request took 110 seconds to complete. The VERY strange part is that the runtime of the Application.cfc onRequest method (the outermost piece of code to run on any request) took only 468ms to complete. So what happened to the 109 seconds that were not spent executing my request? How can I prevent this from happening?

Also observe the Min/Max/Avg response times for the script. At the time of this screenshot, this script had been called 250 times. Multiplying the average response time (.505 seconds) by the request count (250) tells us that this script has occupied 126.25 seconds of server time. Removing this one long running request (250-1, 126.25-110.234) from the statistics, we find the script has an average running time of 0.064 seconds, which is a more reasonable run-time, considering the reported min response time of 0.015 seconds.

Eliminating these random long-running requests will do great things for the usability of the website, as well as free up server resources.

Misc Details

  • ColdFusion Enterprise 8,0,1,195765
  • Monitoring and Profiling Enabled
  • Windows 2003
  • Java 1.6.0_04

Summary

Scripts will randomly take MUCH longer then they usually do.

There seems to be a massive discrepancy between the Response Time and the Time Taken by the onRequest method.

Why is this happening, and what can be done about it?

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Brian's Gravatar Sam, I have experienced this as well except mine are usually around 231 seconds! I have no idea what the problem is... do you have any third party calls in those scripts like a CFHTTP or similar? It could be you just have a really slow/delayed connection to the other end in those particular calls. The script that I have occasionally seen this issue does make a CFHTTP so it could be that the remote end is being pokey when it is normally fast.

Have you made any progress otherwise on the issue?

One other recommendation - upgrade your JVM. That JVM has the classloader bug which will cause all CFCs grief. Even if you're not using CFCs much, ugprading will make everything much snappier. Monitoring will have very little overhead FWIW, but Profiling can be significant.
# Posted By Brian | 6/17/09 2:50 PM
saç ekimi's Gravatar Hi all;very nices article. http://www.sacekimestetik.com my web sites. sac ekimi
# Posted By saç ekimi | 3/23/10 7:07 AM
Dan Harper's Gravatar We are looking for tools to help us better troubleshoot this issue and/or a consultant that can help us track it down. We are using ColdFusion 8 with Windows Server 2003 in a clustered environment with 4 web servers. Over the last 2 weeks a random web server has begun spiking to 100% instantly and the running requests jump to the maximum requests allows and ColdFusion basically stalls. The servers typically average less than 5%. We are using SeeFusion, Uptime and some homegrown tools to help troubleshoot this issue but we have been unable to resolve it. We have also reviewed all IIS log hits during the timeframe, checked all ColdFusion server and runtime logs and event viewer. We have rolled back all code and database changes. I downloaded some mp3 interviews with the programmers on Music Search http://www.mp3hunting.com but it helped only a little. Any help would be greatly appreciated.
# Posted By Dan Harper | 4/16/10 1:57 AM
louis vuitton bags's Gravatar thank you for your sharing.
# Posted By louis vuitton bags | 5/17/10 10:41 PM
# Posted By coach outlet | 5/22/10 12:50 AM
# Posted By gucci bags | 6/1/10 6:44 AM
cheap coach handbags's Gravatar A famous item that every woman wants is <a href="http://www.buycheapcoach.com/products/COACH-Handba... Coach handbags</a>. There are so many brands of Coach handbags that will suit your lifestyle and personality. You can find all styles affordable loves you more online or in <a href="http://www.buycheapcoach.com/">Coach outlet</a> store. Now the coach outlet store has become more and more popular, cause there are so many authentic <a href="http://www.buycheapcoach.com/">cheap coach bags</a> on sale this season.
# Posted By cheap coach handbags | 6/1/10 6:33 PM
coach handbags's Gravatar Do not try to dress the dirty walking in the street, it will make you look very strange. Each product of <a href="http://us-coachhandbags.com/">Coach bags</a> embodies the perfect fusion of design and function. Why not make yourself looked unique by using <a href="http://www.us-coachhandbags.com/products/COACH-Han... handbags</strong></a>? Another way, coach bags has always been considered as a luxury, most women dreamed of owning one, but the high price cause that not everyone can pay. Our shop purchase from the manufacturers at low prices, so you can offer lower prices than anyother stores. You may find all products in our <a href="http://us-coachhandbags.com/"><strong&g... outlet</strong></a> are selld at a wholesale price. You will never be regret to order <a href="http://us-coachhandbags.com/">cheap coach purses</a> here.
# Posted By coach handbags | 6/1/10 6:34 PM
nikeshoes's Gravatar The <a href="http://www.nikedunkshoes.net/">nike dunk shoes</a> is a timeless piece which has seen a plethora of colorways this year alone, and <a href="http://www.nikedunkshoes.net/">nike dunks</a> continues to produce new versions. Jordan has been used every year to replace his boots, and a growing number of admirers have begun to follow this custom, which makes <a href="http://www.nikedunkshoes.net/dunk-sb-high-c-66.htm... top nike dunks</a> become special significance.
# Posted By nikeshoes | 6/1/10 6:34 PM
# Posted By Nike Puma shoes | 6/2/10 8:03 PM