ColdFusion MX 6.1: 'Request timed out waiting for an available thread to run' error
Issue
ColdFusion MX 6.1 customers with high volume sites or long running templates may receive the following error in their default-error logs:
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:125) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:448) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
This error occurs when all active threads are running and queued requests timeout waiting for an available running thread. ThethreadWaitTimeout attribute of the ProxyService specifies the total time queued requests wait for an available thread before they are killed.
ColdFusion MX 6.1 changed the value of the threadWaitTimeout to 20 seconds -- a decrease from the 300 seconds in previous ColdFusion MX versions. With this new default value, threads will time out after 20 seconds in ColdFusion MX 6.1. This change in behavior has been logged as Macromedia issue 55053. In ColdFusion MX 7, the default for threadWaitTimeout is 300.
Solution
Macromedia recommends setting the threadWaitTimeout value equal to the Timeout Requests after ( X seconds ) setting in the ColdFusion Administrator.
ColdFusion MX 6.1 Server Configuration:
- Stop ColdFusion.
- Opencf_root/runtime/servers/default/SERVER-INF/jrun.xml for editing.
- Change the
threadWaitTimeoutattribute of the ProxyService to match the Timeout Requests after ( X seconds ) setting in the ColdFusion Administrator.
<service outputclass="jrun.servlet.jrpp.JRunProxyService" name="ProxyService"><attribute name="activeHandlerThreads">10</attribute> . . .<attribute name="threadWaitTimeout">20</attribute>
- Save the changes to the file.
- Restart ColdFusion.
ColdFusion MX 6.1 - J2EE Configuration with JRun:
- Stop the ColdFusion MX Server instance.
- Open jrun_root/servers/cfusion/SERVER-INF/jrun.xml for editing.
- Change the
threadWaitTimeoutattribute of the ProxyService to match the Timeout Requests after ( X seconds ) setting in the ColdFusion Administrator.
<service outputclass="jrun.servlet.jrpp.JRunProxyService" name="ProxyService"><attribute name="activeHandlerThreads">8</attribute> . . .<attribute name="threadWaitTimeout">20</attribute>
- Save the changes to the file.
- Start the ColdFusion MX Server instance.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
