Configuring the Heap Dump on Out of Memory option

The application can be configured to create a heap dump file should it run out of memory. Once configured properly, the heap dump file will be created in the working directory and will be named java_pid<pid>.hprof (where <pid> is the process id of the Java process). In the event that our support team asks for this file, the following steps will force the system to generate it for the next Out of Memory error that occurs:

Linux/*nix

  • Stop Cascade
  • Edit the file cascade.sh (found in the Cascade root directory)
  • Add the parameter -XX:+HeapDumpOnOutOfMemoryError to line 2 (Example below): export JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=192m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8"
  • Restart Cascade

Windows (command line)

  • Stop Cascade
  • Edit the file cascade.bat (found in the Cascade root directory)
  • Add the parameter -XX:+HeapDumpOnOutOfMemoryError to line 3 (Example below): set JAVA_OPTS=-Xmx1024M -XX:MaxPermSize=192m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8
  • Restart Cascade

Windows (service)

  • Navigate to the \tomcat\bin directory and find the file named tomcat6w.exe
  • Make a copy of this file and rename it cascadew.exe (**note:** if cascadew.exe already exists, skip to the next step)
  • Double-click the file cascadew.exe
  • In the configuration UI click on the Java tab
  • Add the following line in the Java Options box:
    -XX:+HeapDumpOnOutOfMemoryError
    
  • Click Apply
  • Restart the Cascade service

Changing the heap dump location

  • Follow the steps above to modify Cascade's startup parameters
  • Add the following parameter:
    -XX:HeapDumpPath=/path/to/directory
    
  • Restart Cascade

Note: the directory needs WRITE permission for the user that is running Cascade in order for the files to be written to the directory.