Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too.

Skip to end of metadata
Go to start of metadata

Occasionally, JIRA may appear to 'freeze' during execution of an operation. During these times, it is helpful to retrieve a thread dump — a log containing information about currently running threads and processes within the Java Virtual Machine. Taking thread-dumps is a non-destructive process that can be run on live systems. This document describes the steps necessary to retrieve a thread dump.

The steps necessary to retrieve the thread dump are dependant on the operating system JIRA is running in — please follow the appropriate steps:

Windows Environment

JIRA running from startup.bat

  1. In the Command Console window where JIRA is running, open the properties dialog box by right clicking on the title bar and select "Properties".
  2. Select the Layout tab.
  3. Under Screen Buffer Size, set the Height to 3000.
  4. Click OK.
  5. With the same command console in focus, press CTRL-BREAK. This will output the thread dump to the command console.
  6. Scroll back in the command console until you reach the line containing "Full thread dump".
  7. Right click the title bar and select Edit -> Mark. Highlight the entire text of the thread dump.
  8. Right click the title bar and select Edit -> Copy. The thread dump can then be pasted into a text file.

JIRA running as a Windows Service

  1. Visit http://www.adaptj.com/root/main/download and click 'Launch'.
  2. Click 'Run' for any security warnings.
  3. Select 'Process -> Thread Dump'.
  4. Under Process Id, select the '...' button.
  5. From the drop-down list, select the JIRA process. Users running JIRA Standalone should select the 'Java (Tomcat) ...' option. Users running JIRA EAR/WAR should select their application server process.
  6. Click 'OK' to capture the thread dump.
  7. Save the output to a file, e.g. 'threaddump.log'

UNIX Environment

  1. Identify the java process that JIRA is running in. This can be achieved by running a command similar to:
    The process will appear similarly as follows:
  2. In order to retrieve the thread dump, execute the command
    where pid is the process id — in this case, 910.
  3. The thread dump is logged to the console in which JIRA was started. A sample thread dump is available here.

Generating Thread Dumps using jstack

If you have trouble using kill - 3 <pid> to obtain a thread dump, try using jstack a java utility that will output stack traces of Java threads for a given process.

  1. Identify the java process that JIRA is running in. This can be achieved by running a command similar to:

The process will appear similarly as follows:

2. Run jstack <pid> to Capture a Single Thread Dump

This command will take one thread dump of the process id <pid>, in this case the pid is 22668, and log output to the file JIRAthreaddump.txt

3. Take Multiple Thread Dumps
Typically you'll want to take several dumps about 10 seconds apart, in which case you can generate several dumps and output the stack traces to a single file as follows:

  • No labels