You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Black <jb...@ieee.org> on 2005/07/27 20:59:03 UTC

re: how do others deal with classloader not being recycled

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

I am assuming that this FAQ entry is still valid for Tomcat 5.5.9:
  Why does the memory usage increase when I redeploy a web application?
Because the Classloader (and the Class objects it loaded) cannot be
recycled. They are stored in the permanent heap generation by the JVM,
and when you redepoy a new class loader is created, which loads another
copy of all these classes. This can cause OufOfMemoryErrors eventually.

  This could explain why, when I redeploy my webapp many times, I
eventually run out of PermMemory.

  I am curious what others do, in production, because of this issue?

  We are going to be doing some testing to see about optimizing the
memory allocation, but I am curious how others handle this.

Thanx.

- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC59l3ikQgpVn8xrARAjvhAJ0Xus3w6FptvBZhye3wmDbAWkv8ewCfbIZx
CmT6TVS6E22dVdt4p6CyDiU=
=Q+Kv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


re: how do others deal with classloader not being recycled

Posted by Dirk Weigenand <Di...@gmx.de>.
Hi,

> I am assuming that this FAQ entry is still valid for Tomcat 5.5.9:
>   Why does the memory usage increase when I redeploy a web application?
> Because the Classloader (and the Class objects it loaded) cannot be
> recycled. They are stored in the permanent heap generation by the JVM,
> and when you redepoy a new class loader is created, which loads another
> copy of all these classes. This can cause OufOfMemoryErrors eventually.
> 
>   This could explain why, when I redeploy my webapp many times, I
> eventually run out of PermMemory.
> 
>   I am curious what others do, in production, because of this issue?
> 

Have a look at the following page:

http://wiki.apache.org/jakarta-commons/Logging/UndeployMemoryLeak

>   We are going to be doing some testing to see about optimizing the
> memory allocation, but I am curious how others handle this.
> 
> Thanx.

Regards

      Dirk

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org