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

How do I fix OutOfMemoryError: Java heap space

Endomaster JIRA Admin March 2, 2020

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
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 2, 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.

Endomaster JIRA Admin March 2, 2020

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

Purchased July 21, 2022

Inside /bin/setenv.sh, setting -Xmx2048m worked for us during the first boot after the upgrade to 7.18.13. After upgrading Server and Apps we then set it back to the original value -Xmx1024m.

Like Ali ZIAR likes this
Ali ZIAR August 10, 2022

Thx P , it resolved my migration problem.

Regards,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events