See note
- Put the JDBC driver in the general / lib (as the tomcat documentation says), and not in WEB-INF / lib
- Do not put commons-logging in WEB-INF / lib as tomcat already loads it
objects of the new class fall into PermGen and thereby occupy an increasing amount of space. No matter how big you occupy the PermGen space, it will inevitably end after enough deployment. What you need to do is take steps to clean PermGen so that you can stabilize its size. There are two JVM flags that handle this cleanup:
-XX:+CMSPermGenSweepingEnabled
This option enables PermGen in the start of the garbage collection. By default, PermGen space is never included in garbage collection (and thus grows without restriction).
-XX:+CMSClassUnloadingEnabled
This parameter tells the PermGen swing garbage collection to take action on class objects. By default, class objects are freed even when PermGen space is visited during a garabet collection.
source share