MilesWeb
Leading Web Hosting Provider in India Since 2012.
Award-winning Web Hosting Company
Everything that you need to build, host and manage a website is available at just 99/mo

Error occurred during initialization of VM

Using CATALINA_BASE:   /usr/local/jakarta/tomcat
Using CATALINA_HOME:   /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME:        /usr/local/jdk
Using CLASSPATH:       /usr/local/jakarta/tomcat/bin/bootstrap.jar
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

You will receive error above the time you stop/start tomcat on linux cPanel servers. This is because the assigned heap size is insufficient. An alternative is to increase the heap size depending on the RAM allocated to your server.

There are 2 ways you can increase the heap size. Login to your server via SSH & use one of the command below.

export CATALINA_OPTS=”-Xms1024m -Xmx1024m”

OR

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 done you will need to restart tomcat.

[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

 

Neha Khanna

My name is Neha Khanna, I work for MilesWeb.com. I am interested in posting content on various topics. I aim at posting informative articles that provide value to people.

Leave a Reply

Your email address will not be published. Required fields are marked *