Check & Increase Java Heap Size with Web Viewer 12.1
search cancel

Check & Increase Java Heap Size with Web Viewer 12.1


Article ID: 9663


Updated On:


Output Management Web Viewer


Possible symptoms requiring an increase in Java Heap size

  • After new install of Web Viewer or Tomcat Upgrade
  • Having issues from multiple users unable to access OM Web viewer.
  • The web page is loading very slow, partially loading
  • Receive error....CA Output Management Web Viewer r12.1 error.
  • Users "Getting kicked out" of Web Viewer,
  • Getting unpredictable results
  • Seeing error 'java.lang.OutOfMemoryError: Java heap space' in the catalina.out file running Tomcat.
  • Error:  CA DRAS Server is not available for the security check function.

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 


Apache Tomcat

OM Web Viewer 12.1


Insufficient heap size


If you are on a Windows server, before you change these settings, check these hardware recommendations for Windows server to make sure that you have enough RAM:
KB000091893 What are 12.1 Web Viewer and Windows Server Hardware requirements?  In general, you can use about 50% of your installed memory (RAM) for heap if no other applications are running on your server.

What Amount to Specify
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.

If it ends up being at 2048m or lower, you should ask the System Administrators for more RAM to be allocated.

Where to find and change these settings:

  • Web Viewer for Windows with Tomcat running as a Windows Service:

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 1024    
Save and close the file.
Enter the following command: service.bat install 


  • Web Viewer for Windows with Tomcat not running as a Windows Service

In apache-tomcat/bin/catalina.bat find:

             set "CATALINA_OPTS=-Xms1024m and Xmx2048m...

Update and save and close the file.


  • Unix and Linux 

In, set  In apache-tomcat/bin/ find: 
     CATALINA_OPTS="-Xms1024m –Xmx2048m…"  and update and save and close the file.

  • Running Tomcat as a started task

The Java Heap size will be either in your STDENV (parameter) options, or the JCL, wherever your relevant definition is for:
IBM_JAVA_OPTIONS = -Xms256m -Xmx1024m
Update and save.
..but if the System does not have that much available, you will get a startup error that notes the Java Heap size nnnnm could not be allocated. If that happens you should lower the -Xmx setting by 512m at a time until the System accepts that setting. 

Additional Information

For Windows, Unix and Linux, 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.