ColdFusion server-specific error code 2

Had an interesting issue crop up this morning involving one of our legacy Servers running xp IIS 6 and CF 8. ColdFusion stopped working because of a memory heap. But when trying to restart CF through the services control pannel I got the following windows error. service couldn't start due to server-specific error code 2.

1st my colleage and I thought it was due to the JVM.config file and ports being assigned incorrectly but no maintence was recently do on the server and by looking at the config we figured that wasn't the issue.

While browsing though CF specifc logs we noticed that an error occured that stated. Could not create Java Virtual Machine. In doing a quick search I found the following link http://www.tomsguide.com/faq/id-1761312/fix-create-java-virtual-machine-issue.html.

Following these steps fixed our issue and CF started with out a problem.

  • Open the Control Panel
  • Go to System
  • Go to Advanced Systems Properties
  • Then Environment Variables
  • In System Variables, click Add
  • New Variable Name: _JAVA_OPTIONS
  • New Variable Value: -Xmx512M
  • Click OK