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
- Stop Cascade CMS.
- Edit the cascade.sh file (found in the Cascade CMS root directory).
- Add the parameter
-XX:+HeapDumpOnOutOfMemoryErrorto theJAVA_OPTSvariable. - Optionally add a parameter
-XX:HeapDumpPath=/path/to/directoryto specify a location where the heap dump will be stored (by default it will be placed in the working directory). - Restart Cascade CMS.
Example:
XML
export JAVA_OPTS="-Xmx4096M -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)
- Using Windows Explorer, navigate into the tomcat/bin folder.
- Right-click the CascadeCMSw.exe file.
- In the configuration UI click on the Java tab.
- Add this line in the Java Options box:
-XX:+HeapDumpOnOutOfMemoryError - Optionally add a line
-XX:HeapDumpPath=/path/to/directoryto specify a location where the heap dump will be stored (by default it will be placed in the working directory). - Click Apply.
- 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)
- Stop Cascade CMS.
- Edit the cascade.bat file (found in the Cascade CMS root directory).
- Add the parameter
-XX:+HeapDumpOnOutOfMemoryErrorto theJAVA_OPTSvariable. - Optionally add a parameter
-XX:HeapDumpPath=/path/to/directoryto specify a location where the heap dump will be stored (by default it will be placed in the working directory). - Restart Cascade CMS.
Example:
XML
set JAVA_OPTS="-Xmx4096M -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).