Increase heap size for confluence version 6.0.1

Cormant Systems Administrator October 18, 2017

Hi,

 

We have encountered OutOfMemory error Java heap Space. Confluence hangs or behaves unexpectedly not accessible. the atlassian-confluence.log contain an error message like:

 Caused by: java.lang.OutOfMemoryError: Java heap space

 

Our Current config on the setenv.bat is like this.

set CATALINA_OPTS=-Xms1024m -Xmx1024m -XX:+UseG1GC %CATALINA_OPTS%

3 answers

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2018

@Shilpa Sanil We have a guide to help you determine the optimum memory allocation depending on various factors, How to fix out of memory errors by increasing available memory

We aren't really able to give a concrete recommendation for the amount of memory to allocate, because that will depend greatly on your server setup, the size of your user base, and their behaviour. You will need to find a value that works for you, i.e. no noticeable GC pauses, and no OutOfMemory errors.

As instances vary as to content and load, we cannot accurately recommend how resources should be allocated to Confluence. We have provided this guide to help customers make approximate calculations based on number of users and pages, etc: Server Hardware Requirements Guide

Because server load is difficult to predict, live testing is the best way to determine what hardware a Confluence instance will require in production.

0 votes
Gregor Kasmann_Actonic
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.
October 19, 2017

Hi,

1020m and even 1500m is not enough for Confluence 6.*

Please read more about hardware requirements here https://confluence.atlassian.com/doc/server-hardware-requirements-guide-30736403.html

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2017

It will work fine for with 1Gb.  For a small number of users ($10 licence at most) and with collaborative editing disabled.

Gregor Kasmann_Actonic
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.
October 19, 2017

Agree, but collaborative editing is one of the most useful features of Confluence 6. What is the reason of using Confluence 6 without it?

Mizan
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.
October 19, 2017

Collaborative editing has its own memory configurations .

1GB should be enough in many cases. Infact many new installations use this configuration for many days then realize they need to increase the heap, which I suspect is the case for this issue.

Cormant Systems Administrator March 21, 2018

I have 70 users..  is 1GB should be enough? 

Shilpa Sanil June 25, 2018

Hi All,

 

We face the same issue.

We have 2000 users. Can you please suggest what shopuld be the Xms & Xmx value?

0 votes
Mizan
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.
October 18, 2017

Since when are you facing this issue ?

At what time you encounter this error ?

How often you have encountered this issue ?

Do you suspect any operation which might have caused this ?

 

! GB heap comes by default (consider it as a setting suitable for evaluating Confluence) , however as the instance grows you might need to increase the heap size.

There are various factors which may cause a out of memory error.

Newly installed plugin , some memory hungry operation , increased usage , etc

In your case I would recommend increasing the memory to 1.5 GB and observe how the instance behave. 

If you still face issues. increase it to 2 GB . 

If you still face the issue it might be possible that something is causing a memory leak. And you will need to investigate further.

Cormant Systems Administrator October 18, 2017

Hi Mizan,

 

Thanks for the quick reply.

Since last Sunday Afternoon and yesterday around 6pm. then I decided to investigate what cause the downtime, and I find the error java heap space,.

I just want to ask if is okay to increase the memory to 1.5GB from Confluence 6.0.1 version. is this compatible.

Mizan
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.
October 18, 2017

Yes, set -Xms1500m -Xmx1500m , There should not be a problem if there is available hardware resources. What makes you think it may not be compatible ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events