-
1. Re: java.lang.OutOfMemoryError: PermGen space
peterj Oct 3, 2008 5:59 PM (in response to ajanz)You can use JConsole or VisualVM to track the permgen usage. I prefer JConsole because it causes less strain on the app server (VisualVM generates a lot of garbage on the app server which then has to be collected)
You should set a larger permgen on the command line. Edit the run script, the line that sets the heap sizes in JAVA_OPTS and add -XX:MaxPermSize=256m (or larger).
Also, are you doing development work with a lot of redeploys? A redeploy will generally eat up permgen space. If so, you should periodically restart the app server. -
2. Re: java.lang.OutOfMemoryError: PermGen space
sachin.parnami Oct 8, 2008 1:01 AM (in response to ajanz)That means we should clean or undeploy it first and then deploy it. Will that thing helps, inspite of directly overriding deployment?
-
3. Re: java.lang.OutOfMemoryError: PermGen space
peterj Oct 8, 2008 11:38 AM (in response to ajanz)No, undeploying the old version of the app first and then deploying the new version will not help because when you redeploy (in one step) the app server goes through the undeploy and deploy cycle for you. So you can still be using up permgen space. The only solution in this case is to restart the app server to free up the permgen space.
-
4. Re: java.lang.OutOfMemoryError: PermGen space
sachin.parnami Oct 10, 2008 10:28 AM (in response to ajanz)thanks :)
So for that there is only solution and that is to increase the HEAP size. right?
or there is any other solution to it? -
5. Re: java.lang.OutOfMemoryError: PermGen space
peterj Oct 10, 2008 12:28 PM (in response to ajanz)Yes, you can always increase the permgen size, but if you are constantly redeploying your apps, you will eventually run out of permgen space. Hot deployment, while handy for development, is not a panacea, it does have its side-effects. Of course, you could always try to determine if there is something about your app that is causing the permgen space to fill up.
-
6. Re: java.lang.OutOfMemoryError: PermGen space
sachin.parnami Oct 12, 2008 12:22 AM (in response to ajanz)Thanks Peter ;)