how to overcome the Java VM start error (space for object heap)

J. Wilkes August 1, 2012

I'm trying to install JIRA 5.5.1-standalone from archive and keep getting these errors:

> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.

I created a new OpenVZ container with debian lenny, allocated it a full 1.5GB of RAM, installed the sun-java6-jre and set the paths. "java -version" shows

# java -version

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)

I followed the installation instructions and got these error messages.

> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.

After reading several postings about similar issues, i modified the setenv.sh and set the JVM_MINIMUM_MEMORY ot 768m and the JVM_MAXIMUL_MEMORY to 1500 even, but no success.

What am I doing wrong, and what should I change to make JIRA start?


2 answers

1 accepted

3 votes
Answer accepted
J. Wilkes August 1, 2012

Just FYI, maybe it's helpful for somebody else:

my fresh install of JIRA 5.5.1 takes between 2.1 and 2.3 GB of RAM, with 0 issues and standard plugin set.

Daniel Dropik December 15, 2014

I had an identical error. I was running both jira and bamboo from the same virtual private server with only 2GB of RAM. When I stopped running Jira, I was able to use bamboo as normal. I also had similar problems when trying to install both Bamboo and Jira on my 2GB RAM vps, so I suppose that reinforces an obvious point, make sure you have plenty of System RAM available for these products.

1 vote
Jobin Kuruvilla [Adaptavist]
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 Leaders.
August 1, 2012

Looks like you are using JDK 32-bit version. If so, you cannnot assign a Heap size more than 1.2GB or something.

Either use a 64 bit JDK or try with 1.2G as the max heap size.

J. Wilkes August 1, 2012

Yes, I was.

I now tried to increase the overall RAM size to 2GB for the VM, and - lo and behold - it started! But a memory usage of 1891MB virtual strikes me as odd. Is this as it should be? The JVM_MAXIMUM_MEMORY is still at "1200m" as given above, 1891 > 1200

While I am happy I got a step further, I still got the feeling something is wrong.

J. Wilkes August 1, 2012

JVM_MINIMUM_MEMORY="512m"
JVM_MAXIMUM_MEMORY="1024m"

and

JVM_MINIMUM_MEMORY="512m"
JVM_MAXIMUM_MEMORY="1200m"

no success there.

Jobin Kuruvilla [Adaptavist]
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 Leaders.
August 1, 2012

Are you sure you have memory left to allocate?

J. Wilkes August 1, 2012

Now it's JIRA Startup failed: Error occurred while starting Plugin Manager.

With these lines in the catalina.log:

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 65544 bytes for Chunk::ne

Is this correct - JIRA not satisfied with 2GB of RAM on a fresh install? Or is there something else I should check?

J. Wilkes August 1, 2012

Well, it's working now (so-so) and I am grateful for you pointing out the Heap size limit. Thank you!

Suggest an answer

Log in or Sign up to answer