开发者

OutOfMemory error deploying war file in Glassfish 2.1.1 due to too much memory (-Xms -Xmx settings)

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 开发者_Python百科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


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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜