
# Configuring the Heap Dump on Out of Memory option

> This article contains steps on capturing heap dumps from the application. These can be useful for troubleshooting memory problems.

URL: https://www.hannonhill.com/cascadecms/latest/articles/cascade-administration/installation-and-upgrades/system-configuration/heap-dump-oom.html
category: Cascade Administration
article-type: how-to
content-kind: article
release-availability: all
tags: installation
updated: 2026-10-06

## 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.
1. Edit the *cascade.sh* file (found in the Cascade CMS root directory).
1. Add the parameter `-XX:+HeapDumpOnOutOfMemoryError` to the `JAVA_OPTS` variable.
1. 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).
1. 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)

1. Using Windows Explorer, navigate into the *tomcat/bin* folder.
1. Right-click the *CascadeCMSw.exe* file.
1. In the configuration UI click on the **Java** tab.
1. Add this line in the **Java Options** box: `-XX:+HeapDumpOnOutOfMemoryError`
1. 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).
1. Click **Apply**.
1. 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.
1. Edit the *cascade.bat* file (found in the Cascade CMS root directory).
1. Add the parameter `-XX:+HeapDumpOnOutOfMemoryError` to the `JAVA_OPTS` variable.
1. 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).
1. 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).
