Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

memory leaking when using Jira

Alexander Korenev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2017

Hi!

We have an issue with memory leak when using Jira. It has such behavior: after restarting the virtual machine it works perfectly, but a day later it allocates all the available memory, gets into the swap and starts to work slowly. What should we do to solve this issue? We use the jira version 7.2.1 installed on our server Ubuntu 16.04.1 LTS. What other information should I provide?

3 answers

2 votes
Michael Brown [Ascend]
Contributor
October 9, 2017

Are you using the JRE that came packaged with the JIRA installation tool? Use the JavaMelody Monitoring Plugin for JIRA: https://marketplace.atlassian.com/plugins/net.bull.javamelody/cloud/overview

This will help show you where you may be having issues. 

You may also not have enough JVM memory allocated to your JIRA instance. If you are working in a fairly large enterprise, using anything under 2GB allocated to your JIRA instance may cause serious performance issues. Instructions on how to increase your JVM memory: https://confluence.atlassian.com/adminjiraserver072/increasing-jira-application-memory-828788060.html

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 9, 2017

That can be a long and difficult thing to establish, but I would start with getting a thread trace after it starts to run slow, so you can get an idea of what is consuming all the memory.  Although I'd start with some logging changes to get more information dumped.

There are lots of docs on this, but I tend to start with https://confluence.atlassian.com/jirakb/crashes-and-performance-issues-troubleshooting-203394749.html , https://developer.atlassian.com/blog/2016/04/clean-up-the-leak/ and https://confluence.atlassian.com/jirakb/jira-applications-crash-due-to-outofmemoryerror-java-heap-space-191069.html (not so much about leaks, more about the crashing when leaks get too large, but the principles of investigation are still good)

0 votes
Rakesh Jogi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2026

Yes, this typically indicates a memory leak or memory retention issue. If the objects are used, they should not be retained in memory. The garbage collector does not clear these unintentionally stored objects, so it is able to reclaim memory,  causing heap usage to continuously increase.

 

It is better to review Jira’s JVM heap configuration (-Xms and -Xmx) and monitor heap usage over time rather than only at startup. Capture a heap dump at the time of OutOfMemoryError. You can use this  open-source yc-360 script. The yc-360 script is a simple script that captures 16 different artifacts from your application in a pristine manner, which are highly useful to troubleshoot production problems. With the heap dump file that you capture, you can analyze it and check for memory leaks, large object retention, or excessive caching.

 

Additionally, enabling GC logging can help confirm whether garbage collection is unable to free memory, which further supports a memory leak diagnosis. Since Jira 7.2.1 and Ubuntu 16.04 are quite old, upgrading Jira, the JVM, and installed plugins should also be considered, as older versions may contain known memory-related issues. If you are interested in knowing and learning about common signs of a Java memory leak and gaining a better understanding of identifying memory leaks by analyzing heap dumps, check out this blog,  From Symptoms to Solutions: Troubleshooting Java Memory Leaks & OutOfMemoryError.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events