3 Replies Latest reply: Sep 30, 2010 3:38 PM by carl type3 RSS

    CF8 Application Server Service Will NOT Start

    kodemonki Community Member

      I ran into this error:

       

           java.lang.OutOfMemoryError: Java heap space

       

      and after researching it it seemed that I should up the max heap size on the Java/JVM page, so I increased my max heap size to 1044MB from 512, via the CF Administrator, I also added maxPermSize= 256m.  Then I restarted the server, but the Application Server service will not start.

       

      I opened home/runtim/bin/jvm.config and set the heap size to 1024, restart, service still wont start.

       

      Set the max heap size to 512 and removed maxPermSize, restarted server, service still won't start.

       

      Set the entire java.args equal to: -server -Xmx256m -Dsun.io.useCanonCaches=false -xx:MaxPermsize=128m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application. home}/../wwwroot/WEB-INF/cfform/jars

       

      Restarted, still the services will not start.

       

      Does anyone have any ideas?

       

      The error I get when trying to start the services is:

       

      Windows could not start the ColdFusion 8 Application Server on Local Computer.  For more information, review the System Even Log.  If this is a non-Microsoft service, contact the service vendor, and refore to service-specific error code 2.

       

      Thanks!

        • 1. Re: CF8 Application Server Service Will NOT Start
          JR "Bob" Dobbs Community Member

          If you have a backup of the config file before you made the changes, restore that file.

           

          If not, it looks like you have some typos and extra spaces in your arguments.  For example "-xx" should be capitalized and "{application .home}" has a space after "application" that should not be there.  Note the JVM arguments are case sensitive.

           

          Here are the arguments from a working copy of CF8, use at your own risk and backup your config file before making any changes.

           

          -server  -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application. home}/../wwwroot/WEB-INF/cfform/jars

           

          Beware the forum software sometimes adds extra whitespace to text that is posted here.

          • 2. Re: CF8 Application Server Service Will NOT Start
            carl type3 Community Member

            Hi,

             

            Confirm that Bob. When I edit JVM.CONFIG and put in -xx:MaxPermSize=192m ColdFusion fails to start. Changing the case to -XX:MaxPermSize=192m resolves the matter.

             

            Cheers, Carl.

            • 3. Re: CF8 Application Server Service Will NOT Start
              carl type3 Community Member

              Once you have ColdFusion running again this will bring you back to your initial problem:

               

              java.lang.OutOfMemoryError: Java heap space

               

              Suggest take a copy of your working JVM.CONFIG (so you have a backup) then add some debugging to the JVM Arguments eg:

               

              # Arguments to VM
              java.args=-server  -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:cfjvmGC.log -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application. home}/../wwwroot/WEB-INF/cfform/jars

               

              Once ColdFusion is restarted again a log file will be created called \ColdFusion8\runtime\bin\cfjvmgc.log. Open the log file and you will be able to see how the New, Tenure and Permanent memory spaces are working. Given you now know which buffer is filling (excluding New made up of Eden and a couple Survivor spaces - because those fill and empty all the time) you can make adjustments to JVM.CONFIG knowing which value you intend to alter. Likely you want to alter either Xmx or MaxPermSize. When you think the Java heap space is resolved turn logging off by removing the bolded details.

               

              HTH, Carl.