Search code examples
javawindowstomcatgeoserver

Increase java heap space in Tomcat - Windows 7 Client


I have Apache Tomcat installed on my Windows 7 Client machine, and am utilising geoserver.war as a deployment.

I keep on getting timed out/Java memory issues within Geoserver. [(http://localhost:8080/geoserver/web/]

There are lots of examples on how to increase space under Linux but not under a Windows Client. I currently have 8GB of DDR5 memory and an Intel Core i5.

Any ideas on how I increase this on a Windows Client?


Solution

  • You can increase the JVM heap space by adding the following parameters, also it should work on Windows and Linux:

    -Xmx2048m -> this param to set the max memory that the JVM can allocate
    -Xms1024m -> the init memory that JVM will allocate on the start up
    -XX:MaxPermSize=512M -> this for the max Permanent Generation memory
    

    In order to add them under tomcat:

    • Navigate and open tomcat7w.exe inside [TOMCAT_HOME]/bin
    • Go to Java tap, then add them under Java Options