> From: Jim [mailto:[EMAIL PROTECTED]
> PermGen space, on the other hand, doesn't get garbage
> collected, so you
> need to ensure you're allocating enough to handle all that your
> application will need.  Unfortunately with the web application
> classloader-system, every time you deploy an application without
> restarting the application server, more PermGen space is eaten up, and
> this is never recovered (not even if you undeploy an application).

Not entirely true.  Modern Java virtual machines perform garbage collection on 
PermGen, but it's remarkably easy to leave a reference lying around that will 
hold a class in memory - which holds the class' ClassLoader in memory, which 
holds all the other classes loaded by that ClassLoader in memory.  Unless you 
have unusually good hygiene rules as you develop, this makes it look like 
PermGen never gets garbage collected!

There's plenty of past discussion on the list on this topic; I've no doubt 
Chuck will reply, but I suggest http://tomcat.apache.org/faq/memory.html as a 
good place to start reading.

It may not be your webapp's code that's at fault, by the way.  There are plenty 
of third party libraries that don't clean up after themselves properly 
(including some I've written, I'm ashamed to admit).

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to