users@glassfish.java.net

Re: Could not reserve enough space for object heap

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Fri, 25 Feb 2011 09:31:06 -0600

If you only have 562 MB of virtual memory available, and you try to run
a Java process with a 512MB heap, it's not going to work. On the system
I have running now, with a DAS heap size of 512MB, the virtual memory
size of the DAS process is 831 MB. This extra space is for the code and
stack areas of the process.

Tom


On 2/25/2011 8:29 AM, jvr wrote:
> 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.
>
>