users@glassfish.java.net

Could not reserve enough space for object heap

From: jvr <jvr968_at_gmail.com>
Date: Fri, 25 Feb 2011 15:29:27 +0100

Hi,

 

When I execute the Glassfish Server I'm receiving this error:

 

Waiting for DAS to start . Error starting domain: domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
 
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Command start-domain failed.

 

I have changed the -Xms and -Xmx jvm-options at domain.xml

 

        <jvm-options>-Xms256m</jvm-options>

        <jvm-options>-Xmx512m</jvm-options>

 

At a windows sytem with only this jvm-option:

        <jvm-options>-Xmx512m</jvm-options>

 

The server starts correctly and I can work with Galssfish server whithout
any problem.

 

But in a VPS,

Linux version 2.6.9-023stab048.6-enterprise (root_at_rhel4-32) (gcc version
3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Mon Nov 17 19:09:18 MSK 2008

 

vmstat

procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------

r b swpd free buff cache si so bi bo in cs us sy id wa
st

0 0 0 562804 0 0 0 0 0 0 0 75 0 0 100
0 0

 

With 562804 free, when I tried to start the domain privvmpages exceeds its
limits.

 

In a windows system when Glassfish starts, is using only around 100mb but on
the VPS is using more than the free memory 562804

 

Seems Glassfish is using more than jvm-option -Xmx than was setted.

 

Any suggestion?

 

Thank you.

Regards.