Monday, January 10, 2011

PermGen Error on Tapestry

If your Tapestry application is displaying PermGen Error, it looks like you need to increase MaxPermGen value. According to http://tapestry.apache.org/specific-errors.html, you need to set -XX:MaxPermSize=512m in your JAVA options. Default MaxPermSize is only 64m.

The permanent generation is used to hold reflective data of the VM itself such as class objects and method objects. This is where class definitions go (and this explains why you may get the message OutOfMemoryError: PermGen space if an application loads a large number of classes and/or on redeployment).
If you're using Tomcat running as Windows Service, you can set this value on  Start->Program->Apache Tomcat->Configure Tomcat, and choose Java tab.



Note: Tapestry 5.2 needs bigger PermGen than Tapestry 5.1, but will consume lower heap memory (Maximum heap setting can be configured using: -Xmx600M).

Source:
http://www.mail-archive.com/users@tapestry.apache.org/msg47526.html
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-and-memory-td3333624.html#a3333665
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
http://stackoverflow.com/questions/1634216/what-is-permsize-in-java

No comments:

Post a Comment