The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Confluence java.lang.OutOfMemoryError: Java heap space, what is the correct setting?

Axel Endler
July 10, 2020

Environment
Atlassian Confluence 6.12.0 
mysql Ver 15.1 Distrib 5.5.60-MariaDB
openjdk version "1.8.0_181"
Parameter
/data/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/data/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -Dconfluence.context.path=/confluence -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/data/atlassian/confluence/logs/gc-2020-07-10_08-40-18.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Dignore.endorsed.dirs= -classpath /data/atlassian/confluence/bin/bootstrap.jar:/data/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/data/atlassian/confluence -Dcatalina.home=/data/atlassian/confluence -Djava.io.tmpdir=/data/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
Result after 7 hours
catalina.2020-07-01.log:01-Jul-2020 02:27:15.823 SEVERE [http-nio-8090-exec-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path [/synchrony-proxy] threw exception [Handler processing failed; nested exception is java.lang.OutOfMemoryError: Java heap space] with root cause
java.lang.OutOfMemoryError: Java heap space
at java.util.LinkedHashMap.newNode(LinkedHashMap.java:256)
at java.util.HashMap.putVal(HashMap.java:631)
at java.util.HashMap.put(HashMap.java:612)

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Sachin
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.
July 10, 2020

If you are seeing some performance issues or slowness. The first thing I would do is check the current maximum heap allocation on your instance lets say its 1GB, it is possible that you are simply running out of memory to perform the tasks that need to be performed on it. If you think that this is the case, a possible resolution step would be to increase the heap allocation on the JVM, so increase the -XX:MaxPermSize parameter in 256mb increments until the error stops occurring.

Here are some helpful Resources:

Server Hardware Requirements Guide
Memory Usage and Requirements
Managing Application Server Memory Settings
How to analyze thread dumps

Axel Endler
July 13, 2020

Will try tonight (/data/atlassian/confluence/bin/setenv.sh):
old:   CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"
new: CATALINA_OPTS="-Xms1024m -Xmx1280m -XX:+UseG1GC ${CATALINA_OPTS}"

Like Sachin likes this
Sachin
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.
July 13, 2020

Nice! Let us know how it goes.

Sachin
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.
July 14, 2020

You can ignore those Warnings for now @Axel Endler, glad to hear that it's performing better now.

TAGS
AUG Leaders

Atlassian Community Events