Increasing Java Memory available to Applications Manager

Document ID : KB000088261
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Increasing Java Memory available to Applications Manager
Resolution:
Error Message Details:

ErrorMsg: AwE-9999 Internal error (1/7/11 7:19 PM)
Details: null
java.lang.OutOfMemoryError: Java heap space
 
Symptoms

An error similar to the one above is displayed in a pop-up dialog box while in the Applications Manager (AM) client or is found in the RmiServer log.
 
Cause

The error above may occur due to Applications Manager's increased reliance on Java and there not being enough Java resources to handle the work. By default we allocate 1024 MB of Java memory, which may not be enough in some AM environments. The error may occur whenever you run out of Java memory. This can occur at different times but we have seen this error occur most often when:
  • There is a significant increase in job workload.
  •  Modifications are being made to existing AM jobs and Process Flows to add additional components or predecessors.
  •  You are attempting to log into the client and it is trying to load a large amount of history.
  • You upgrade to v8.0 from a v6.x or below (when we moved much of the AM processes from using C code to utilizing Java code) and there isn't enough memory allocated for the AM processes to use.
 
Resolution

The java memory available to Applications Manager can be increased by adding a line in the sosite file, stopping the RmiServer process, executing the sosite file to incorporate the change and restaring the RmiServer process. Below are the instructions for Unix/Linux and Windows environments to increase the Java memory allocated to AM to 2048 MB.

UNIX / Linux

Edit the $AW_HOME/site/sosite file and add the appropriate AX_JAVA_OPTIONS line to the end of the file, then save the changes and exit.

     For most UNIX operating systems add:

         
AX_JAVA_OPTIONS=2048m;export AX_JAVA_OPTIONS

Exception for SUN and TRU64 operating systems the syntax is slightly different:

          AX_JAVA_OPTIONS=-Xmx2048m;export AX_JAVA_OPTIONS

Then execute the following commands for the change to take effect:         

     stopso rmi
     cd $AW_HOME
     . site/sosite
     startso rmi 

Verify that the change took effect:

ps –aef | grep java

You should see something similar to this, which indicates that the java process is utilizing 2048 MB of memory:

       java -DAGENT=UNIX80 -Xmx2048m -DAW_HOME=/home/qa4/unix80 -DOsType=UNIX com.appworx.server.data.AxRmiServer
 

Windows

Edit the %AW_HOME%\site\sosite.bat file and add the AX_JAVA_OPTIONS line to the end of the file, then save the changes and exit.

set AX_JAVA_OPTIONS=-2048m (Limit may be 1536M in some systems)

Then execute the following commands for the change to take effect:

stopso rmi
cd %AW_HOME%
. site\sosite.bat
startso rmi 
 

NOTE: 

A dynamic Java memory range can also be set by modifying the AX_JAVA_OPTIONS variable similar to this:

AX_JAVA_OPTIONS="2048m -Xms1024m"

In the example above this entry would allow AM to allocate up to twice the normal amount of memory to be used by the RmiServer process as needed.