UnixServerAdmin

Server Administration & Management

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine

The following error is occur due to memory size assigned to Tomcat service is full.

———————————————————————————————————————–
Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
———————————————————————————————————————–

You need to run following commands from Shell

# cd /usr/local/jakarta/tomcat/bin/

# export _JAVA_OPTIONS=ā€¯-Xms20m -Xmx64m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m -XX:MaxNewSize=10m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabledā€¯

Once you run above command restart the Tomcat service

#./shutdown.sh

#./startup.sh

#./catalina.sh

Advertisements

October 8, 2011 Posted by | Java, Tomcat | , | Leave a comment