1

I am getting the below error in my ColdFusion application: *

11/21 11:23:43 Debug [scheduler-1] - Next mail spool run in 15 seconds. 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

* I know ColdFusion apps with high volume sites or long running templates may receive the mentioned error. I believe this is not a defect in the application but a problem in CF itself. So to eliminate this I was trying to increase the "Maximum number of running JRun threads" under "Server Settings" --> "Request Tuning". But I was surprised to see that the whole field is missing there in the Admin - "JRun Master Request Limits". please refer the screen shot below. enter image description here And the same field is available in my local CF Admin(developer edition). See screen shot below:

enter image description here

Any idea? Why this discrepancy? And how should I increase the threads?

Vasu
  • 319
  • 5
  • 19
  • Is your production server deployed on JRun as a standalone install, or is it a J2EE install, possibly atop another servlet container? – Brad Wood Jan 22 '15 at 07:57
  • Yes it deployed on JRun as a standalone application. – Vasu Jan 22 '15 at 11:51
  • I don't know whether it has been removed and restructured in the newer version. But below link says something: http://www.carehart.org/blog/client/index.cfm/2007/7/3/cf8_admin_changes – Vasu Jan 22 '15 at 12:06
  • Are they both running the same version of coldfusion? Which version is it? I The JRun Master Request isn't there in CF10 & 11 as it runs on Tomcat not Jrun – haxtbh Jan 22 '15 at 12:24
  • Yes. The version is 9 – Vasu Jan 22 '15 at 12:34
  • Standard or Enterprise? I believe its a Enterprise only option as well. – haxtbh Jan 22 '15 at 12:42
  • Oh. You mean only enterprise has this option..right? So now if I want to increase the running JRun thread where shall I do it in Std version?? – Vasu Jan 22 '15 at 12:48
  • Better suited to Server Fault. Voting to close. – Scott Stroz Jan 22 '15 at 14:46
  • Yes, developer runs in "enterprise" mode. There may not be a way to change it. Look in the /lib/*.xml files to see if the setting is stored there and works if manually changed. The real answer is upgrade to Enterprise if you want that feature :) Scott is right though, this isn't a programming question. – Brad Wood Jan 22 '15 at 15:51

1 Answers1

3

As mentioned in the comments the setting for Maximum number of running JRun Threads is an Enterprise version only option. The developer edition is equal to the Enterprise version with limited IPs. That is why you see it on your local.

Even though the option is not listed in the administrator for the Standard version, obviously it is still there behind the scenes. Here is how you change the setting for Standard:

  1. Go to the directory cf_root\runtime\lib\wsconfig\1.

    Note: In multiserver scenarios, the location is jrun_root/lib/wsconfig/1. 1 indicates a single IIS website. If you have configured multiple IIS websites, the number can change accordingly.

  2. Open the file jrun_iis6_wildcard.ini (jrun_iis7_wildcard.ini if you use IIS 7).

  3. Uncomment maxworkerthreads=25.

    Note: By default, maxworkerthreads is commented.

  4. Change the value to 50 (maxworkerthreads=50) from the default value of 25.

  5. Restart IIS 6/IIS 7.

Note: The Maximum number of Simultaneous Template requests (Admin > Server Settings > Request Tunings > Request Limits) must also be increased accordingly.

Reference - IIS 6/IIS 7 for ColdFusion 9: Increasing the Number of Worker Threads

Mark Kruger gives a bit more information about it here - IIS 7 Max Worker Processes and ColdFusion Updated

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
  • 1
    So you have confirmed above *does* work with Standard? Mark's entry mentions "It's about the connector not the application engine." but there is no mention of standard/enterprise so I was not sure (and do not have time to test it now). – Leigh Jan 22 '15 at 16:26
  • @Leigh no I did not confirm. I found several references to those steps and thought I would leave the testing to the OP. – Miguel-F Jan 22 '15 at 16:29
  • Okay. I was thinking there might be some config file that could be changed, but I know that some settings are still restricted at runtime based on version. (Though it may be app specific settings only) I will wait to see what the OP finds out. – Leigh Jan 22 '15 at 16:34
  • Well your thinking was right Leigh. I found out the place where I can edit the max number of threads. I accept your answer. Thank you ALL for your help. – Vasu Jan 23 '15 at 11:24
  • @Vasu - Miguel-F was the one that suggested the setting. So you can confirm it *does* work with standard? (I am curious, but have not been able to try it yet) – Leigh Jan 26 '15 at 19:59
  • @Leigh - Initially I thought it did worked with the settings you had suggested. But later it again failed giving the same error. I believe this manual settings can run up to some limit, but if we are executing longer running templates or long running sites, we better switch to Enterprise edition. – Vasu Jan 27 '15 at 09:05
  • @Vasu - Too bad, it sounded promising. BTW, the answer was posted by Miguel-F - not me. I am just a curious "lurker" on this thread ;-) – Leigh Jan 27 '15 at 18:11
  • @Leigh - At this point I'm not sure what settings have been changed by the OP??? In your comment you mentioned a config file which I assume you meant one of the neo... files. Those can definitely be overwritten by ColdFusion. The change I referred to is for the connector's ini file which ColdFusion would not overwrite. Running the web connector would though. – Miguel-F Jan 27 '15 at 19:08
  • @Miguel-F - I have no idea. I assume he followed the instructions quoted above. Re: Config - I meant "config" files in the general sense, ie any file with configuration settings. In this case, the .ini file you quoted above. – Leigh Jan 27 '15 at 19:36