Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to monitor Confluence Heap memory

sowmya March 5, 2019

Hi,

We are frequently facing the outofmemory issue in our Confluence Application.Please let me know if anyone have idea about  Monitoring the the Heap memory automatically.

Please share me the details if there is any monitoring tool ,any automation jobs or any other possible ways to fix this issue.

 

Thanks,

Sowmya

1 answer

2 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2019

Hi Sowmya,

There are several monitoring tools available that can help you see what's happening in your JVM.

Hosted as a service:

Running locally:

Without knowing how large your JVM heap currently is or what your environment looks like, it's hard to say off-hand if just increasing your heap would help out in your situation. With more details (max / min heap allocations, number of users, number of plugins), the Community might advise you to make some tweaks. I'd also look for activities around times you see your heap spiking - particular plugins for example might be using a lot of memory for a function triggered only by one user, which causes a spike that exhausts your remaining heap.

Finally I cannot recommend this talk enough by Atlassian's own Denise Unterwurzacher to help inform how to do JVM memory tuning.

Cheers,
Daniel

Doug Swartz
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 Leaders.
March 5, 2019

In addition to the tools mentioned above, you could try out the Java Melody plugin. 

Daniel is correct. More allocated heap may, or may not, help. If you don't have a good understanding of how Java manages memory, and the talk referenced above doesn't help you, you need to find or contract with someone with Atlassian application tuning experience. 

Like # people like this
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2019

Gonna hop on the "Java tuning recommendation" train here and also suggest:

Like Jim T likes this
sowmya March 6, 2019

Hi All,

Thanks a lot for the replay.

Our application is running as a windows service,and its currently allocated with the default JVM heap memory i.e. 1024 MB.

We have previously attempted to increase memory allocated to Confluence We found that the additional memory was not recognized by Confluence, and determined that this was because we are still running an old 32 bit version of the application and JVM which does not allow for heap size beyond 1024MB.

We have around 230 users and 57 installed plugins in confluence ,i am not sure about finding out which plugin is consuming more memory. Please let me know what are the ways to check which plugin is consuming more memory.Also Please let me know if we have any script to get the JVM memory statistics details as we have JAMS available for scheduling purpose which is similar to New Relic and App Dynamics agent installation

 

Thanks,

Sowmya

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2019

I can speak from experience and say 1GB of heap is not sufficient for that many plugins. A near-similarly sized Confluence (user count, plugin count) I admin'd in the past required 4GB for the usage it was getting.

Your next step is to see about running on a 64bit Java. Technically 32 bit Java will support 4GB of memory usage but if you're also running on a 32 bit operating system, you are also limited by the operating system's 4GB max RAM (meaning you can probably only get 2GB for Java, assuming nothing else is running on that server).

I would not recommend instrumenting your JVM at that heap usage given the limitations. Monitoring agents also consume a small portion of the available heap, and you don't have any to spare.

If you are on a 64 bit operating system, fixing this is as easy as telling Confluence to use a different Java runtime.

What operating system are you using (Windows, Ubuntu, etc) and can you determine if it is 64bit?

Like Zak Laughton likes this
Doug Swartz
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 Leaders.
March 6, 2019

@sowmya   Agree that 1 GB seems small for the number of users and plugins.

If I read what you're saying correctly, you are running an old version of Confluence. Before updating your Java version, verify the version of Java you're upgrading to is supported by the version of Confluence you have.

sowmya March 6, 2019

Hi Daniel,

Thanks for the information.

Yes, our operating system is windows and it is of 64 bit. Can you please give me more details on the below one.

fixing this is as easy as telling Confluence to use a different Java runtime.

 

Thanks,

Sowmya

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2019

Excellent, this is progress!

At this point we should note that even with your existing 32bit Java, you should be able to increase to 2GB of heap allocation and buy yourself a little breathing room while the next steps are determined.

We've got a KB article describing how to increase the heap allocation here if you need detailed assistance. In short, you want to modify the Xmx and Xms flags to 2048 MB from their current values of 1024 MB. The document describes how to find these values in a couple different ways (search for Windows Service on the page). The service will need to be restarted for the new heap value to take effect.

As Doug mentioned, it might be useful in knowing which version of Confluence. Java 8 is supported from Confluence 5.7 onward - what version of Confluence are you currently on?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events