It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I fix OutOfMemoryError: Java heap space

We have Confluence, Jira and bitbucket privately hosted.

This morning when I tried to access the confluence site, it reported as "This site can't be reached"

 

hosted on the same PC and sharing the Jira user list is Jira and bitbucket and both works fine.

 

I logged in to the server and did : ps -aux and it seems that the confluence task is still running:

conflue+ 20267 1.1 24.4 5212732 1969944 ? Sl Jan20 691:42 /home/confluence/jre//bin/java -Djava.util.logging.config.file=/home/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -D
conflue+ 20624 1.4 9.2 4944968 746788 ? Sl Jan20 876:34 /home/jira/confluence/jre/bin/java -classpath /home/confluence/temp/2.1.0-release-confluence_6.5-1a01ab2d.jar:/home/jira/confluence/confluence/WEB-INF/lib/postgresql-42.1.1

 

I paste below the last lines in catalina.out:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Caesium-1-3"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "synchronyProxyFilter-7549"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "lucene-searchers-pruner-org.apache.lucene.store.MMapDirectory@/home/jira/application-data/confluence/index/edge lockFactory=org.apache.lucene.store.NativeFSLockFactory@16e410bf:thread-1"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "C3P0PooledConnectionPoolManager[identityToken->z8kflta71hhcpgwx0okno|406d9dd0]-HelperThread-#0"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "synchronyProxyFilter-5412"
SEVERE:Memory usage is low, parachute is non existent, your system may start failing.Exception in thread "atlassian-instrumentation-jmx:thread-1" 23:07:44 [synchronyProxyFilter-5967] o.e.j.u.t.QueuedThreadPool[WARN] run -
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception in thread "synchronyProxyFilter-838" java.lang.OutOfMemoryError: Java heap space
Exception in thread "C3P0PooledConnectionPoolManager[identityToken->z8kflta71hhcpgwx0okno|406d9dd0]-HelperThread-#2" java.lang.OutOfMemoryError: Java heap space
23:07:44 [synchronyProxyFilter-5967] o.e.j.u.t.QueuedThreadPool[WARN] run - Unexpected thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$2@6877f820 in synchronyProxyFilter{STARTED,8<=8<=256,i=0,q=0}
23:07:44 [synchronyProxyFilter-3978] o.e.j.u.t.QueuedThreadPool[WARN] run - Unexpected thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$2@6877f820 in synchronyProxyFilter{STARTED,8<=7<=256,i=0,q=0}
23:07:44 [synchronyProxyFilter-191] o.e.j.u.t.QueuedThreadPool[WARN] run - Unexpected thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$2@6877f820 in synchronyProxyFilter{STARTED,8<=8<=256,i=0,q=0}
Exception in thread "synchronyProxyFilter-191" java.lang.OutOfMemoryError: Java heap space
Exception in thread "synchronyProxyFilter-3978" java.lang.OutOfMemoryError: Java heap space

1 answer

1 accepted

0 votes
Answer accepted
Daniel_Wong Community Leader Mar 02, 2020

Hi Sebastian,

It looks like Confluence has run out of memory. You'll need to increase the memory allocated to Confluence in your setenv file.

I suggest going through this KB before making changes to understand what needs to be increased to avoid OOM errors in future - https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html

In addition, it sounds like you are hosting Confluence, Jira and Bitbucket on the same server? If you are, I suggest splitting them out to their own server as it is not recommended to run all 3 applications on the same server.

Hi Daniel,

Yes you are right, we are running all three on the same server due to resource constraint and also for convenient deployment.

 

I see that we use the following:

CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"

 

I intend to double it to see if such issues are encountered anymore.

 

Would you see if there is any issue of my approach? Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,466 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you