>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

jRun maxing out due to fusebox /coldspring and a stupid mistake!

I've been spending the afternoon finding out why my server has been running really slow and stopping altogether. After searching the logs i didn't get much inforamtion, so i decided to do some thread dumps and see what was happening. To do this i started CF via DOS running cfstart.bat i.e.

c:\CFusionMX\bin> cfstart > cfThreadOut.txt

Looking through this I noticed that coldspring was being invoked over and over again. I thought for a while and then realised my mistake:

Don't EVER, EVER upload your fusebox.xml.cfm to a production server with the mode set to 'development-full-load' mode set to true!

<parameter name="mode" value="development-full-load" />

Normally deployment would have been done via a deploy script but time wasn't on my side... this is what you get when you code until 4am in the morning.


 
Comments
Julian Halliwell's Gravatar I avoid having to worry about this by checking which server I'm running on in appinit and forcing the mode to "production":

if(
(cgi.server_name IS NOT "dev")
AND
isDefined("application.fusebox.mode")
AND
(application.fusebox.mode IS NOT "production")
)
{application.fusebox.mode   =   "production";}
# Posted By Julian Halliwell | 10/07/07 08:21 | Report abusive comment
Sean Corfield's Gravatar In the new world of Fusebox 5, the better way to check the mode is:

myFusebox.getApplication().mode

(since the FUSEBOX_APPLICATION_KEY may be something other than "fusebox")

In Fusebox 5.5, you'll be able to mollify this somewhat by specifying:

FUSEBOX_PARAMETERS.mode = "production";

in your (production) index.cfm so as long as you don't overwrite that, the setting in fusebox.xml.cfm won't matter.

I'm also looking at adding some sort of debug / troubleshooting mode that displays important stuff like this... some sort of Fusebox application console.
# Posted By Sean Corfield | 10/07/07 20:08 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.