Question on point #4, Do you mean that tomcat(or Java) will have multiple copies of the same class, assuming same jar shipped with different applications, Can't tomcat class loader identify & avoid them?
If there is a web hosting company, multiple application may use the same jar (say struts1.x.jar) - so does JVM keep multiple copies of the class in PermGen? Kindly clarify me. Regards, Mohan -----Original Message----- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 18, 2007 11:25 AM To: Tomcat Users List Subject: Re: Tomcat PermGen OutOfMemoryException solution? -----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] This email is confidential. If you are not the addressee tell the sender immediately and destroy this email without using, sending or storing it. Emails are not secure and may suffer errors, viruses, delay, interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not accept liability for damage caused by this email and may monitor email traffic. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]