The permanent generation is where the JVM places stuff that probably won't (garbage) collected as custom class loaders.
Depending on what you are deploying, the perm gen setting may be low. Some combinations of applications and / or containers contain some memory leaks, so when the application becomes idle, sometimes some things, such as class loaders, are not collected, which causes Perm Space to fill up, creating your error.
Unfortunately, currently the best option in this case is to maximize the perm space with the following jvm flag (example for a size of 192 m):
-XX:MaxPermSize=192M (or 256M)
Another option is to make sure that the container or infrastructure is not a memory leak.
Miguel Ping Sep 20 '09 at 18:28 2009-09-20 18:28
source share