How to Check and Increase your Java Heap size with CA Output Management Web Viewer 12.1

Document ID : KB000009663
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

These parameters specify the Memory settings  (Java heap size) when launching Tomcat

ms – the initial heap size when the Java application is starting 

mx – the maximum heap size 

Background:

Apache Tomcat

Instructions:

Where to find and change these settings:

•Web Viewer for Windows with Tomcat not running as a windows service:  In apache-tomcat/bin/catalina.bat:

             set "CATALINA_OPTS=-Xms1024m and Xmx2048m...

•Web Viewer for Windows with Tomcat running as Windows service:  In apache-tomcat/bin/service.bat (for example):


      find "--JvmMs1024

                    --JvmMx2048”

•Other Operating Systems: In apache-tomcat/bin/catalina.sh: 
     CATALINA_OPTS="-Xms1024m –Xmx2048m…" 
 

The amount of memory you specify for the maximum value is dependent on the amount of memory you have available.

  • Xmx4096m is the minimum recommended, and in cases of heavy usage, you may need to increase that to Xmx8192m.

You do not need to change the initial heap size setting even if it is lower than the value above.   

 

Instructions on Doing this if Tomcat is running as a Service on Windows

Stop the Tomcat service.

On the command line, go to the <installation dir>/tomcat/bin directory.

Enter the following command: service.bat remove

Open the <installation dir>/tomcat/bin/service.bat file in a text editor.

Locate the following entries and change the numbers to suitable memory values (in MB):

 

    --JvmMs 512

    --JvmMx 4096    (or up to 8192)

 

Save and close the file.

 

Enter the following command: service.bat install 

Additional Information:

Monitor the catalina.out file for java.lang.OutOfMemoryError: Java heap space errors to be sure that the setting you specified provides enough heap space.