Posts tagged Error occurred during initialization of VM Could not reserve enough space

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

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

When you get this error thenĀ  just run the commmand :

=============================================================================================

[email protected] [/]#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”

=============================================================================================

OR

===========================================
export CATALINA_OPTS=”-Xms1024m -Xmx1024m”

=======================================

Then restart the tomcat service :

[email protected][~]# /usr/local/jakarta/tomcat/bin/./shutdown.sh
[email protected][~]# /usr/local/jakarta/tomcat/bin/./startup.sh
[email protected][~]# /usr/local/jakarta/tomcat/bin/./catalina.sh run

That’s all this will do it.