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

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

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

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

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

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

Nice! Let us know how it goes.

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

82 views 0 1
Read article

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