Error occurred during initialization of VM Failed to allocate initial heap.

Quinn October 8, 2019

I'm trying to start a confluence server for my Atlassian stack, but every time I try and start it nothing happens. After poking around in the logs I noticed that every startup triggers this error:

Error occurred during initialization of VM
Failed to allocate initial heap.

Is there a fix for this? I've never been able to access the panel (since this error has occurred every time).

1 answer

1 accepted

1 vote
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2019

Hello there, @Quinn H. !

As I understand, your Confluence installation never starts. Looking at the excerpt you provided, I can tell you that I have seen this issue before.

The cause for this issue, last time, was that no notation was used when typing out the desired amount of heap for the instance.

We can check if the same situation applies to your instance. For such, we can do the following:

  1. Make sure no Confluence process is running
  2. Find <confluence-install> folder
  3. There, look for the /bin folder
  4. Within this file, find the section that reads CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC $CATALINA_OPTS"  or similar to this
  5. Look for the values of Xms and Xmx
  6. Check if the value has the m notation (as in megabytes) after the number

 

Now, some advice on memory allocation. For testing purposes, 1024m (or 1GB for that matter) should be enough. However, for real-world usage, I advise you to try and increase this value to at least 2048 (2GB) or more, depending on your user volume, add-on usage and intensity of use. Think of intensity as how many users are actively typing pages at the same, add-ons doing their job and people actually sifting through all your pages.

Also, never allocate all your machine’s RAM to Confluence heap. We need to have some working space for the hosting operating system to breathe. Again, how much you leave for your operating system depends on what else runs in it and how much it uses in and idle and working state.

If you want to take a look at our documentation on memory allocation for Confluence, here is the link:

 

Let us hear from you!l Looking forward to your reply.

Quinn October 10, 2019

Thank you very much! Increasing the heap to 1,500m solved the issue.

Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2019

Hello again @Quinn H. !

Glad to know that this solved your issue. Come share with us again!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events