{"id":55,"date":"2012-05-31T14:58:55","date_gmt":"2012-05-31T14:58:55","guid":{"rendered":"http:\/\/www.milesweb.co.uk\/blog\/?p=55"},"modified":"2023-02-01T13:32:47","modified_gmt":"2023-02-01T13:32:47","slug":"error-occurred-during-initialization-of-vm","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/blog\/hosting\/vps\/error-occurred-during-initialization-of-vm\/","title":{"rendered":"Error occurred during initialization of VM"},"content":{"rendered":"<blockquote><p>Using CATALINA_BASE:&nbsp;&nbsp; \/usr\/local\/jakarta\/tomcat<br \/>\nUsing CATALINA_HOME:&nbsp;&nbsp; \/usr\/local\/jakarta\/tomcat<br \/>\nUsing CATALINA_TMPDIR: \/usr\/local\/jakarta\/tomcat\/temp<br \/>\nUsing JRE_HOME:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/usr\/local\/jdk<br \/>\nUsing CLASSPATH:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/usr\/local\/jakarta\/tomcat\/bin\/bootstrap.jar<br \/>\nError occurred during initialization of VM<br \/>\nCould not reserve enough space for object heap<br \/>\nCould not create the Java virtual machine.<\/p><\/blockquote>\n<p>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.<\/p>\n<p>There are 2 ways you can increase the heap size. Login to your server via SSH &amp; use one of the command below.<\/p>\n<blockquote><p>export CATALINA_OPTS=&#8221;-Xms1024m -Xmx1024m&#8221;<\/p><\/blockquote>\n<p><strong>OR<\/strong><\/p>\n<blockquote><p>export _JAVA_OPTIONS=&#8221;-Xms20m -Xmx64m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m -XX:MaxNewSize=10m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled&#8221;<\/p><\/blockquote>\n<p>Once done you will need to restart tomcat.<\/p>\n<p>[root@server ~]$ \/usr\/local\/jakarta\/tomcat\/bin\/shutdown.sh<br \/>\n[root@server ~]$ \/usr\/local\/jakarta\/tomcat\/bin\/startup.sh<br \/>\n[root@server ~]$ \/usr\/local\/jakarta\/tomcat\/bin\/catalina.sh run<\/p>\n<p>For <a href=\"https:\/\/www.milesweb.co.uk\/hosting\/vps-hosting\/\">VPS hosting<\/a> service, unmanaged VPS hosting and also all other type of hosting solutions, you can consider <a href=\"https:\/\/www.milesweb.co.uk\/\">MilesWeb<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using CATALINA_BASE:&nbsp;&nbsp; \/usr\/local\/jakarta\/tomcat Using CATALINA_HOME:&nbsp;&nbsp; \/usr\/local\/jakarta\/tomcat Using CATALINA_TMPDIR: \/usr\/local\/jakarta\/tomcat\/temp Using JRE_HOME:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/usr\/local\/jdk Using CLASSPATH:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/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&#8230; <a class=\"read-more\" href=\"https:\/\/www.milesweb.co.uk\/blog\/hosting\/vps\/error-occurred-during-initialization-of-vm\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[365],"tags":[10,11],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-vps","tag-java-heap-size","tag-tomcat-errors"],"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":9,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":15398,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions\/15398"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}