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 :

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

root@server [/]#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 :

root@server[~]# /usr/local/jakarta/tomcat/bin/./shutdown.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./startup.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./catalina.sh run

That’s all this will do it.