JBoss AS 4.2.x and java.lang.OutOfMemoryError: PermGen space
January 28, 2008
Somtimes after multiple deployments of an application in a JBoss AS instance it's possible that the server instance throws an error of type java.lang.OutOfMemoryError: : PermGen space .
to fix that problem, we have to patch the $JBOSS_HOME/bin/run.sh file with this proposition:
- firstly, we have to find the variable JAVA_OPTS in the file
- then we have to enhance the variable like this:
JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx512m -XX:CMSPermGenSweep:ngEnabled
-XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
The PermGenSpace of a JBoss AS instance has a standard value of 64m, therefore breaks down often the server instance.
About
This page contains a single entry from Serge Pagop's Weblog posted on January 28, 2008 2:28 PM. The previous post in this blog was $8.5 Billion to buy the big cake BEA Systems. The next post in this blog is Is JBoss 4.2.x AS Java EE 5 compatible?. Many more can be found on the main index page or by looking through the archives.
Trackback Pings
TrackBack URL for this entry: http://www.innoq.com/movabletype/mt-tb.cgi/2992