KB-1176 How to generate a Java heap dump

Purpose

Appian Technical Support might ask you to provide them with Java heap dumps to troubleshoot memory leaks, performance issues, etc. There are different ways of generating this file. This article describes the most common way of generating a heap dump. Please note that these commands should be run on the application server machine when collecting a heap dump of the application server's Java process.

Instructions

  1. For Windows, open Command Prompt as administrator (right-click Windows Command Processor and select Run as administrator). For Linux, open a new Terminal session.
  2. Navigate to <JAVA_HOME>/bin.
  3. Run the following command (replace <APPIAN_HOME> with the path to <APPIAN_HOME> and <PID of Java Process> with the ID of the Java process):
    jmap -dump:format=b,file="<APPIAN_HOME>/logs/heapdump.hprof" <PID of Java Process>

The jmap command will generate a file named heapdump.hprof under <APPIAN_HOME>/logs.

To determine the ID of the Java process, run ps -ef | grep java in Linux or open Windows Task Manager and go to the Processes tab in Windows.

Note: the raw heap dump file may contain sensitive information from your Appian environment. Appian support will provide steps on your support ticket for analyzing the .hprof file captured.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: May 2023

Related
Recommended