1
votes

We get an error (OutOfMemory) when we deploy a war file in Glassfish 2.1.1. This is related to the memory options in the domain.xml file.

We increased the -Xmx and -Xms jvm-options settings to 1024 instead of the default 512, like this:

<jvm-options>-Xms=1024m</jvm-options> 
<jvm-options>-Xmx=1024m</jvm-options> 
<jvm-options>-XX:MaxPermSize=256m</jvm-options> 
<jvm-options>-server</jvm-options> 
<jvm-options>-D64</jvm-options>

The command we use:

asadmin deploy --user admin --passwordfile <passwd-file> --host localhost --port 4848 <warfile>

The error we got in server.log:

[#|2011-03-15T09:40:56.750+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=15;_ThreadName=Thread-40;_RequestID=16902980-9800-488e-82b5-0104cd18e57c;|Exception occured in J2EEC Phasejava.lang.OutOfMemoryError: com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module ...

When we change the jvm-options back to the original value (512m), the error is solved. Any clues why this is happening? Is there a maximum value for these settings?

System info
Java version: Java HotSpot(TM) Server VM (16.3-b01-jre1.6.0.07-rc1)
OS: HP-UX Itanium 64bit

1
Is there enough memory to allocate for the java heap in the machine you are trying to run it? A possible try with Xms128m Xmx1024m I had similar problem a couple of years ago.topless
Yes there is more then enough memory available (several GB's). Setting the Xms to a lower value does help. One of the problems (bugs) we encountered Glassfish is that GF uses the Xms value when the Xmx value is higher then the Xms value. Setting Xms to a lower value (and with that setting the Xmx to a lower value) does work, but this is not a solution for us, because we need the memory to be 1024m (or as high a possible if 1024m is not plossible).JohanKees
version of java/ OS architecture; do you have enough PermGen? and ultimately show the command line the application is started w/, linux ps can do that, winows7 task manager can show it, or process explorer for other versions of windows. The OOM is unclear: heap/perm gen/direct buffers space etc. Please edit the question.bestsss

1 Answers

0
votes

You are using a 64-bit setup, but you cannot get use of the 64-bit features in total, meaning your memory usage is lacking. I found interesting post on that: http://www.java.net/node/704100

Could there be help of this tip? Tick my answer if you got some new ideas with this link :)