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 Server
  • 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 Server

Windows (command line)

  • Stop Cascade Server
  • 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 Server

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