It's related to the way Sun's JVM handles class data and internalized string. They make the assumption that you'd never want that information flushed from the VM, so they put that chunk of memory out of the reach of the garbage collector (i.e. "permanent generation"). Unfortunately, when you redeploy an application, you're really attempting to remove a bunch of classes and replace them with new ones. That simply doesn't work with Sun's VM; you only end up with both the old and the new classes in PermGen, even if the old class data is no longer useful or even accessible.

There's no way around this one if you're using Sun's VM. Raising the amount of memory available for the permanent generation is really only a stop gap measure. If you feel you're going to redeploy your app very often, you should look into using another VM. I personally use JRockit for development (which is when I do most of my redeployment), even if I only run Sun's VM for staging and production servers (in order to take advantage of the deeper testing done on that VM).

Hope it helps.


*************************************************************
Denis Robert
Senior Technical Architect
BF&M Insurance Group
Phone: (441) 298-0344
Email: drobert@bfm.bm
*************************************************************
This email and any files transmitted with it are
confidential and intended solely for the use of the
individual or entity to whom they are addressed.
If you have received this email in error please notify
the system manager.
*************************************************************



Dario Andrade <dario@sinistro.net>

04/25/2007 11:31 AM
Please respond to
user@geronimo.apache.org

To
user@geronimo.apache.org
cc
Subject
Re: OutOfMemoryException while redeploying WAR






That has to do with the PermSize. It is the classloader's memory.

Set -XX:MaxPermSize=256M at startup.

--
Dario

Jochen Zink escreveu:
> Hello,
>
> I'm using Geronimo 1.1.1 and have a problem.
>
> I'm developing a little JSF-Webapplication. First, I deploy the WAR to geronimo and after modifiying the sources I redploy the application WAR. That works fine. But after a while, I get OutOfMemory Exceptions while redeploying. After restarting Geronimo, everythink is fine.
>
> Is this a bug, or a kind of "wrong use of redeploy"?
>
> Thanks
>
> regards
> Jochen Zink
> _________________________________________________________________________
> Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
> Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179
>
>
>
>