-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luca,

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:

http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf
http://wiki.apache.org/tomcat/MemoryLeakProtection

I'm sure there are others.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk0Gi5MACgkQ9CaO5/Lv0PBtpgCYv5IQdjEY0g3Amj5i9fDFFGTt
EwCfeLB5W8Zp4DiPErOKO1vYnJcT92Q=
=vp5f
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to