-
1. Re: PermGen space
peterj Sep 29, 2008 1:52 PM (in response to tgcosta)In a typical application, the permgen will grow to a certain size and then stay at that size for the rest of the app run. Some of the reasons that the pergen size will increase are:
* Deploying a new application
* Redeploying an application
* Accessing new functionality within an application
If you find that you are redeploying applications often, then you will need to periodically restart the app server.
The JVM will remove unneeded class definitions from the permgen during a garbage collection, but sometimes classes in an old version of an application still hang around even after a new version has been deployed, hence the increase in permgen size.
If you are not redeploying applications, then you need to monitor the permgen size (use JConsole or a similar tool) and when you see a permgen increase you need to figure out what was going on at that time. -
2. Re: PermGen space
tgcosta Sep 29, 2008 3:49 PM (in response to tgcosta)Hi Peter
I'm really thankful with your attention.
Then, the only form that i have to get free space in PermGen is restarting the app server or upgrade the PermGen size.... is this?
I can't force GC on the PermGen?
Do you know if in these news versions, this problem is fix?
What do you recommend?
Thanks.
Thiago -
3. Re: PermGen space
peterj Sep 29, 2008 4:00 PM (in response to tgcosta)As I already mentioned, the permgen is automatically garbage collected with unused classes being removed. The issue is that there are many situations where you believe that classes should not be in use but in fact they really are. Once you determine why the permgen is increasing in size, then you can put together a plan of action, with restarting being one of the possible options.