KB-1177 How to generate a Java thread dump


Appian Technical Support might ask you to provide them with Java thread dump to troubleshoot performance issues. There are different ways of generating this file. This article will describes the most common way of generating a thread dump.


Steps to identify top threads by CPU

In Linux, run top, press the c key, then press Shift+H. This will show the threads sorted by highest to lowest CPU usage. Please provide a screenshot of the output.

In Windows, use Process Explorer or Process Monitor to show the threads for the Java process and take a screenshot of the top threads by CPU.

Typically, collecting this information is only necessary when you are actively experiencing slowness/performance issues.

Steps to collect thread dumps

  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: jstack JAVA_PROCESS_ID > "<APPIAN_HOME>/logs/threaddump_<#>.txt"
  4. If and only if the Java process is unresponsive, use the following command: jstack -F JAVA_PROCESS_ID > "<APPIAN_HOME>/logs/threaddump_<#>.txt"
    • Replace <APPIAN_HOME> with the path to <APPIAN_HOME>, JAVA_PROCESS_ID with the ID of the Java process, and <#> with the thread dump attempt.
  5. Repeat Step 3 at least 5 times every 2 to 3 minutes minimum, increasing <#> by 1 for each successful thread dump collected.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: March 2017