Java heap space : failure while Restore XML Backup Data

I am facing the above error while restoring XML data backup of Confluence (4.2.2). My Confluence version is 5.1.4

I got java.lang.OutOfMemory: Java HeapSpace

I made the following changes-

I Changed the catalina.bat file setting CATALINA_OPTS= -Xms512m -Xmx1024m in plugin directory

I tried giving the atlas-run --jvmargs "-Xmx1024"

Also I tried setting the MAVEN_OPTS= --Xms512m-Xmx1024min the atlas-run.bat

Is there anything needed to change apart from the above steps.

Now i can’t complete version upgrade Kindly help me out on this.


3 answers

0 votes

You've managed to hit almost every memory setting except the one you actually need to.  Put the settings for catalina.bat and atlas-run.bat back the way you found them.  Catalina is a default which is overridden later, and atlas-run has nothing to do with the installation as it's about a Confluence on an SDK, which you probably don't want to be importing into because it's for development, not testing anyway.

Find setenv.bat in the bin directory, adjust the -Xmx setting in there.


I edited the setenv.bat,but useless and still Java HeapSpace,so what should i do?

No idea, what's the new error?


In addition to Nic's answer, you can also follow the below guide for instructions on how to increase the available heap memory in case you're running Confluence as a service:


0 votes

Hi Zhu,

I also recommend to increase the XMS to the same value as the XMX to discourage the Garbage collector and increase performance. As Nic said, the XMX is the target to be increased here.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

783 views 33 5
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