Tuesday, January 31, 2012

java.lang.OutOfMemoryError: PermGen space - Cause and Solution

The error was (in maven):
java.lang.OutOfMemoryError: PermGen space

Solution:
If you build with maven:
MAVEN_OPTS="-Xms512m -Xmx768m -XX:PermSize=256m -XX:MaxPermSize=512m"
AND
JAVA_OPTS="-Xms512m -Xmx768m"

If you use other tools, check their OPTS configuration - may be there is analogue.

No comments:

Post a Comment