Configuring the Heap Dump on Out of Memory option

Overview

The steps listed below can be used to configure Cascade CMS to generate a heap dump file in the event that it runs out of memory. Heap dump files can be very useful when troubleshooting potential memory issues in the Cascade CMS environment.

Important: This option should be configured only as directed by the Hannon Hill Product Support team.

Linux/*nix

  1. Stop Cascade CMS.
  2. Edit the cascade.sh file (found in the Cascade CMS root directory).
  3. Add the parameter -XX:+HeapDumpOnOutOfMemoryError to the JAVA_OPTS variable.
  4. Optionally add a parameter -XX:HeapDumpPath=/path/to/directory to specify a location where the heap dump will be stored (by default it will be placed in the working directory).
  5. Restart Cascade CMS.

Example:

 export JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=192m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8"

The resulting heap dump file will be will be named java_pid<pid>.hprof (where <pid> is the process id of the Java process).

Windows (service)

  1. Using Windows Explorer, navigate into the tomcat/bin folder.
  2. Right-click the CascadeCMSw.exe file.
  3. In the configuration UI click on the Java tab.
  4. Add this line in the Java Options box: -XX:+HeapDumpOnOutOfMemoryError
  5. Optionally add a line -XX:HeapDumpPath=/path/to/directory to specify a location where the heap dump will be stored (by default it will be placed in the working directory).
  6. Click Apply.
  7. Restart the Cascade CMS service.

The resulting heap dump file will be will be named java_pid<pid>.hprof (where <pid> is the process id of the Java/Tomcat process).

Windows (command line)

  1. Stop Cascade CMS.
  2. Edit the cascade.bat file (found in the Cascade CMS root directory).
  3. Add the parameter -XX:+HeapDumpOnOutOfMemoryError to the JAVA_OPTS variable.
  4. Optionally add a parameter -XX:HeapDumpPath=/path/to/directory to specify a location where the heap dump will be stored (by default it will be placed in the working directory).
  5. Restart Cascade CMS.

Example:

set JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=192m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8"

The resulting heap dump file will be will be named java_pid<pid>.hprof (where <pid> is the process id of the Java process).