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

Ondrej,

Ondrej Zizka wrote:
> Suppose there is a school server where students (re)deploy their apps, each 
> of which's classes definitions take about five to ten MB.
> Now we have dozens of students, who will deploy at least once, but rather 
> several times a day. That means the server has to be restarted every few 
> hours.

I was recently taken to task for asserting that Java holds on to
outdated java.lang.Class objects even after the ClassLoader is
discarded. (This might happen when a webapp is reloaded).

It turns out that I'm an old war horse and that problem was fixed a very
long time ago.

If you are having memory problems it is more likely that one of the
following is occurring:

1. You have one or more misbehaving webapps (they are retaining memory
   longer than they should).
2. You are running a very old and/or buggy version of Java
   and/or Tomcat.
3. The webapp reload procedure is not working as you expect.
4. You have tons of libraries that are being individually reloaded
   by each web application. Take the advice of your article and
   provide shared versions of many popular libraries.

> There is no way to automatically flush the PermGen somehow? Or, under which 
> conditions can the GC collect undeployed app's classes data?

I'm pretty sure you can't do that unless you write some JNI code, and
you might not even be able to do it even then.

Another poster suggested that you have your students setup their own
Tomcat environments. I completely agree ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrwuj9CaO5/Lv0PARApS6AJ9a0NJROkyHw94AtRNMV7mHtravOgCfWCON
Jx0dBNtvOrY2aq/9v/CFBNI=
=j14Q
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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