Steven Erat's Blog
 
 
Viewing By Entry
 
 

TalkingTree  Request timed out waiting for an available thread to run

 

The ColdFusion MX error message "Request timed out waiting for an available thread to run" occurs specifically when a thread in the queued request pool times out while still in the queue, before it ever had a chance to make it to the running request pool. This blog entry revisits a topic previously blogged about here.

An example of the Java stack trace for the exception might look like this at the top:

java.lang.RuntimeException: Request timed out waiting for an available thread to run. You may want to consider increasing the number of active threads in the thread pool.
   at jrunx.scheduler.ThreadPool$Throttle.enter(ThreadPool.java:116)
   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:425)
   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

The helpful hint provided in the exception message suggests increasing the active thread pool size, which would correspond to the Simultaneous Requests setting in the ColdFusion Administrator. While that might be a short term band-aid to the problem, in most cases this will simply delay the onset of the symptoms rather than truely solve the problem.

To back up for a moment, I'll take a look at some of the settings in the JRun server's jrun.xml configuration file, found in the SERVER-INF directory for a given server instance. The threadWaitTimeout setting in jrun.xml controls how long a thread will wait in the queued request pool. The activeHandlerThreads setting is the same as the Simultaneous Requests setting in the CFAdmin, and this setting is the maximum size of the running request pool, or the maximum of how many actual requests could be actively processed at any given moment. The maxHandlerThreads is the maximum total thread limit as a sum of the running request pool size (activeHandlerThreads) plus the maximum allowed queued threads (which can be restated at the maxiumum number of queued threads is equal to maxHandlerThreads - activeHandlerThreads).

If you're getting this error, then the problem is most likely bottleneck requests that are shifting the throughput rate downward so that more threads are added to the queued request pool than can be reasonably processed by the running request pool. It's not necessary that the running request pool is completely occupied with bottleneck threads, but just enough of them to cause a noticeable increase in current number of threads in the queued request pool. This doesn't necessarily mean that the queued request pool has reached its maximum size, but just that the threads in the queued pool weren't getting a chance to run within the threadWaitTimeout period.

To better diagnose the problem, try to find out what's in the running request pool. I recommend taking a series of three thread dumps about 15-30 seconds apart at the time this error is being reported, and then looking for differences between the running threads across the span of the three thread dumps to identify any that might be 'stuck' on something. The running threads are usually identifiable by having a 'jrpp-' to the thread id number and a reference to one of your application templates in the stack such as those with a .cfm or .cfc extension.

Related entries:

Related Blogs:

 


Comments

There are no comments for this entry.

 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Search This Site

 
This is an exact search only

About This Site

 
I live west of Boston and work for Adobe with ColdFusion and Flex, and specialize in Linux. I'm also interested in travel and science, and I'm studyng photography at CDIA. Curious about my banner image?

More about me

Recent Entries

 
Hollywood East comes to Bosto..

Recent Comments

 
Posted By Jennifer:
First of all thank you for this great article it was very helpful for my situation. I have used the omit="yes" to omit the optional items that se ...

Posted By Mark Lynch:
Thanks for the tips. I found another issue relating to MYSQL autoconfiguration which I've documented here: [link] Thanks, Mark ...

Posted By Quinn:
even when a cert is imported to the keystore, it looks like coldfusion does not support the "Subject Alternative Name" extension of the cert. i've ...

recently played

 
Episode 18 - StackOverflow
by Jeff Atwood and Joel Spolsky
on IT Conversations
IT Conversations, Jeff Atwood and Joel Spolsky

now playing, a plug-in for itunes

Categories

 
RSS Adobe (29)
RSS Bicycling (9)
RSS Blogging (37)
RSS Books (13)
RSS Breeze (12)
RSS CFMX Podcasts (10)
RSS ColdFusion (417)
RSS Computer Technology (49)
RSS Events (25)
RSS Flash (3)
RSS Flex (17)
RSS Gadgets (10)
RSS HiTech Industry (16)
RSS Java (25)
RSS Learning (54)
RSS Linux (70)
RSS Mac OS X (21)
RSS Macromedia (28)
RSS Meetup (34)
RSS New England (60)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (26)
RSS Photography (105)
RSS Photoshop (28)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

Blogs I Read

 
Scrum Sucks
Ben Forta
Ray Camden
Kinky Solutions
Gary Gilbert
Red Hat Blogs
O'Reilly Digital Media
O'Reilly Radar
John Nack
The Strobist
Scott Kelby
Matt Kloskowski
Joe McNally
Digital Photography School
Engadget
Science Blog

RSS

 


Add to Google
Add to My Yahoo!

Aggregated By

 


Consumed By Feed-Squirrel.com
Aggregated by ColdFusionBlogger.org

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software
CJM Group - ColdFusion Website Hosting


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2008 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer