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).

Generating a heap dump file

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 the JAVA_OPTS ¬†variable
  • Restart Cascade

Example:

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

Windows (service)

  • Double-click the file CascadeCMSw.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

Windows (command line)

  • Stop Cascade
  • Edit the file cascade.bat (found in the Cascade root directory)
  • Add the parameter -XX:+HeapDumpOnOutOfMemoryError to the JAVA_OPTS variable
  • Restart Cascade

Example:

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

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.

Did this answer your question?