I am running Tomcat(6.0.18)/jdk1.6.0_02, ~ after every couple of hours tomcat crashes with the following exception logged:
Code:
SEVERE: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: PermGen space
Google comes up with quite a lot of info on this, i haven't managed to find a conclusive solution to this though.
I have increased the PermGen size from it's default 64MB, and tomcat seems to be working "fine" now, however, theres quite a lot of info on the Internet pointing a possibility of tomcat crashing again as PermGen gets filled up gradually with the applications being deployed/undeployed/redeployed.
Is GC enabled on the PermGen memory area by default?
Would enabling GC on PermGen memory area using
Code:
-XX:+CMSPermGenSweepingEnabled
in JAVA_OPTS prevent PermGen from running out of memory with time? Also, would there be performance hit as a result of using this option?
Hoping to hear from your experience on this.
thanks