users@glassfish.java.net

Re: Glassfish memory allocation

From: Alexis Moussine-Pouchkine <alexis.moussine-pouchkine_at_oracle.com>
Date: Tue, 12 Oct 2010 18:01:18 +0200

On 12 oct. 2010, at 17:10, glassfish_at_javadesktop.org wrote:

>> There are several OOM errors, is this one for the
>> heap?
>
> Yes.
>
>>> I notice that although the the OS has 4Gb the
>> memory used is about 3.8Gb. Normally glassfish runs
>> with about 600Mb.
>>
>> Each 32-bit process can address in theory 4GB. In
>> practice a JVM on windows can hit the ceiling at 2GB
>> but that should be enough for you.
>
> How can the OOM error be avoided then?

Either :
a/ clean up any memory "leak",
b/ use less memory (requires code change)
c/ or allow for more using -Xmx (assuming a/ was taken care of)

>>> If glassfish then needed another 200+, taking the
>> OS over the 4Gb limit what would happen?
>>
>> Doesn't this add up to 1GB, no?
>
> 800+Mb, which goes over the 4Gb limit, but maybe that's not the issue.

Oh you mean the machine has 4GB of RAM?
Then buy more, RAM is cheap ;)

-Alexis

>> Sharing the exact exception stack trace would help I
>> think.
>
> This is the error I see,
>
> [#|2010-10-06T20:27:35.530+0100|SEVERE|sun-appserver9.1|Connectivity.cmOrdersGeneratorHL724_jcdOrdersGeneratorHL7241.jcdOrdersGeneratorHL724_Runtime_Handler|_ThreadID=4776;_ThreadName=p: thread-pool-1; w: 214;_RequestID=2ee4f9a9-921f-4266-96f4-a0fb6b08c58c;|java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
>
> Rupert
> [Message sent by forum member 'ruperty']
>
> http://forums.java.net/jive/thread.jspa?messageID=484963
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>