tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [Mostly OT] Sweeping the permgen space: is that a good thing?
Date Mon, 13 Dec 2010 21:09:39 GMT
Hash: SHA1


On 12/13/2010 5:13 AM, Luca Gervasi wrote:
> I have this supposely leeking application that keeps saturating the
> permanent generation.
> The problem is an out of memory on the permgen.
> Studying the JVM, i understand that the permgen is never sweeped by GC.

To add to what others have hinted at: I believe you have a memory leak
in your web application that is causing your java.lang.Class objects to
stay in memory beyond the lifetime of the webapp.

Please confirm that the following behavior is observed:

1. Deploy your webapp
2. Use it for a while (or not)
3. Re-deploy your webapp
4. Repeat #2-#3 several times
5. OOM: PermGen is encountered

Somewhere between #4 and #5, you have looked at the contents of your
permgen and you've seen that you have multiple instances of
java.lang.Class for com.mycompany.mypackage.MyClass laying around.

If the above is true, then your webapp is creating a situation where it
cannot properly be flushed by the GC when your webapp undeploys.

There are many posts to this mailing list covering this as well as
several sites on the web giving an overview on how to detect and fix
these problems. Here are a few off the top of my head:

I'm sure there are others.

Hope that helps,
- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message