How to Generate an AEM Heap Dump
Your AEM instance is running slower and eventually stops with some variation of an out of memory errors or exceptions. You also see errors in the logs similar to the following:
OutOfMemoryError: Java heap spaceorOutOfMemoryError: gc overhead limit exceeded.
Heap memory is the run time data area from which the memory for all java class instances and arrays is allocated. The heap is created when the JVM starts up and may increase or decrease in size while the application runs. The size of the heap can be specified using –Xms VM option.
This blog shows some ways to generate the AEM Heap Dump for analysis as well as possibly sending it as part of your DayCare ticket to Adobe or when trying to collaborate and troubleshoot with other teams.
How to Check your AEM Heap Memory:
This is usually set by the jvm parameter-Xmx as part of your AEM start up script. It would be similar to something like this:
-server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true
For this AEM instance, the heap memory allocated is 1024m.
You can also check it via the AEM Web Console:
1. From the operations Dashboard, click on Web Console:
2. Click on Web Console > System Information:
3. The Total Memory + Free Memory should be very close to the heap memory you allocated for your AEM (-Xmx):
Technical Steps in generating the Heap Dump
There are two ways to generate the AEM Heap Dump:
A. Via the Diagnosis Dashboard
1. From the Operations page, click on Diagnosis:
2. Click "Download Heap Dump":
3. Click on Download:
B. Via the Web Console
1. From the Operations page, click on Web Console:
2. Click on Web Console > Memory Usage:
3. Click on Dump Heap:
4. Download the file: