Monday, March 03, 2008

Coldfusion Application Server service terminated with service-specific error 2

Sometime last week, one of our main ColdFusion servers needed a bit of a pick-me-up, and one of our server guys juiced it with 2 more gigs of RAM. After the new RAM was installed, I went into the ColdFusion administrator, and upped the MAX Heap Size. I changed it from 1024 to 2048 and saved. It gave me a polite message stating that the change would take effect after the ColdFusion server restarted. I moved on with life, not restarting the server or service at that time; the work day had begun, people were already hitting our server, best to leave well-enough alone.

This morning I checked the cool new ColdFusion Server Monitor included with CF8. I saw several hung threads, which are a sure sign that your server is inching towards becoming unresponsive (the more hung threads, the fewer resources available to working threads). I decided that rather than waiting for our server to stall in the afternoon, I would restart the ColdFusion service right then, and the hung threads would evaporate. So I did. And the service never restarted.

Our main server guy was out of town, and the other server guys were busy, so I dug in to try to figure out what was going wrong myself. I did some research.

In the Event Viewer, I found an error that looked something like this:

"Coldfusion Application Server service terminated with service-specific error 2"
A bit of time on Google taught me that one of the causes of this error is services starting too slowly. This can be mitigated by giving them more generous timeouts. For more information, see the below:

I did what it said there (adjusting for ColdFusion 8), restarted the server, and nothing changed. The ColdFusion service still didn't come up. By now I started to suspect that my JVM Heap changes of the previous week had precipitated the problem. Some more time spent with Google, and I found this useful link:

This little gem teaches you how to go into the server's jvm.config and adjust JVM args directly, including the Max and Min Heap sizes. Server restart, and problem solved.

No comments: