re: how do others deal with classloader not being recycled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

re: how do others deal with classloader not being recycled

James Black-4
-----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    [hidden email]
-----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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

re: how do others deal with classloader not being recycled

Dirk Weigenand
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: [hidden email]
For additional commands, e-mail: [hidden email]