Friday Dec 05, 2008
Tomcat OutOfMemoryError: PermGen space
Recently, I was confronted with yet another
java.lang.OutOfMemoryError: PermGen space
This time it was Tomcat, getting completely stuck after typically one or two days. I have a couple of applications deployed on Tomcat, and indeed, these applications are predominantly based on Hibernate and Spring.
After some research on the Internet, I readily reached the conclusion that resolving
the symptoms would be much quicker and easier than trying to resolve the cause. I stopped
Tomcat and exported my
export "JAVA_OPTS=-Xmx512m -Xms512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m"
Thereafter I restarted Tomcat. It is now running happily ever after.