Out of Memory : Metaspace in Confluence 5.8 with Java 8

Hi, everyone,

 

If I remember correctly, Confluence 5.8 is the first confluence version which dropped support of Java 7.

Now, I'm running Confluence 5.8.4 with Java 8(1.8.0_45) on Mac OS X 10.10 Yosemite

After upgrading to Confluence 5.8 from 5.7, everyday it stops working due to "Out of memory : Metaspace" exception.

 

I see the explicit command line in following location.

INST_DIR/bin/setenv.sh

contains,

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


As far as I understand Metaspace for Java 8, the MaxMetaspaceSize is unlimited by default.

Why would we want to have limitation here instead of leave as it is?

 

From now on, I will remove MaxMetaspaceSize option, and will see what happens next.

 

 

1 answer

1 accepted

JAVA VM Status from Confluence Administrator Page

Heap memory = 1024MB

Used = 732MB

Free = 291MB (29%)

Process Monitor

VIRT = 5599MB

RES = 1794MB

MEM% = 11% (System Memory = 8GB)

Current status without MaxMetaspaceSize option

So far, no sign of "Out of Memory".

Conclusion

Get rid of that option!

I also removed this parameter after having trouble with the maxmetaspace ... Working just fine now :)

same here unbelievable support was sending me different values to "try and see"

I had all my apps running on one sever with 8GB RAM (crowd, jira, stash, confluence, bamboo). I kept getting the OutOfMemory error and kept increasing MX. Server was at 7GB with 500MB Swap used. I even moved confluence to it's own VM with it's own 8GB RAM...max 4GB used with zero Swap (wasting 4GB RAM) Still kept getting the error. Then I finally tried to figure out what MetaSpace was. (at least ask a question here). Thank you all for the answer here. I have removed the value from my setenv.sh and am anticipating positive results!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

982 views 23 13
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you