JIRA Documentation

JIRA 6.4.x
JIRA 6.0 Documentation
JIRA 5.2 Documentation
JIRA 5.1 Documentation
More...
 

 

Search the Knowledge Base and Documentation Spaces

You're visiting the JIRA Knowledge Base. Visit the JIRA Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata

Heap Dumps

One of the most effective ways of troubleshooting and identifying memory problems within JIRA is to have Java output the contents of its memory into a heap dump. There are arguments that will tell the Java Virtual Machine (JVM) to do this automatically when it encounters an OutOfMemoryError (OOME). These heap dumps can then be analysed to identify problems within JIRA.

Diagnosis

To enable the JVM to generate a heap dump on an OutOfMemoryError, add the following arguments to the JVM as in our Setting Properties and Options on Startup documentation. If JIRA runs out of memory, it will create a jira_pid*.hprof file containing the heap dump in the directory specified below. If you use your $JIRA_INSTALL directory for this, it will be easy to locate.

(info) Using the -XX:HeapDumpPath parameter is optional. If it is not used, the heap dump will be generated within the Java working directory.

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/atlassian/jira/

If you are running JIRA on Windows and this setting has been configured in the Windows registry (i.e. because JIRA is running as a service), then each parameter needs to be placed on a new line, for example:

-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\Program Files\Atlassian\JIRA\

When a heap dump is generated, it will be the size of the current heap (e.g.: a 4gb heap will have a 4gb heap dump). If you are running a JIRA instance with a large heap (greater than 4096mb), it can make it harder to analyse as significant resources are required to analyse large heap dumps.

It is also possible to manually generate a heap dump, as in this documentation. However if a heap dump is not generated when an OutOfMemoryError is thrown, it is generally not at all useful.

Analysis

  1. After a heap dump is generated, they can be analyzed with VisualVM or Eclipse' MAT.
  2. Oracle also has a Troubleshooting Guide for Java.

In addition to heap dumps, you can also use GC logging for analysis. Please refer to our Using Garbage Collection Logs to Analyze JIRA Performance KB article for further information on this.

Recommendations

It is unwise to provide general recommendations for all situations - there is no substitute for an in-depth assessment using analysis tools. Atlassian recommends engaging the services of an Atlassian Expert for performance analysis of JIRA and the environment it runs in.

Related Content

 Expand to see related content
Unknown macro: {dynamiccontentbylabel}
Help us improve!
Unknown macro: {kbsurvey}