Tuesday, May 22, 2012

Tomcat - java.lang.OutOfMemoryError: PermGen space problem

When i run tomcat, sometimes i got JVM out of memory. This is due to insufficient tomcat memory allocated.

Solution
Steps :
1)Open catalina.sh in specific tomcat. tomcat/bin/catalina.sh
2)add in JAVA_OPTS value: -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC
3)Restart tomcat again

For more you can refer Here