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

VM Could not reserve enough space

How to resolve VM Could not reserve enough space

The following “Error occurred during initialization of VM” 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

root@admin[/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

root@admin[/usr/local/jakarta/tomcat/bin]#./shutdown.sh

root@admin[/usr/local/jakarta/tomcat/bin]#./startup.sh

root@admin[/usr/local/jakarta/tomcat/bin]#./catalina.sh

The above steps resolve the error occurred during initialization of vm.

About Anant 384 Articles
Senior technical writer