Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 49504 invoked from network); 13 Dec 2010 21:10:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Dec 2010 21:10:13 -0000 Received: (qmail 70862 invoked by uid 500); 13 Dec 2010 21:10:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 70651 invoked by uid 500); 13 Dec 2010 21:10:09 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 70642 invoked by uid 99); 13 Dec 2010 21:10:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 21:10:09 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [76.96.62.64] (HELO qmta07.westchester.pa.mail.comcast.net) (76.96.62.64) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 21:10:00 +0000 Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) by qmta07.westchester.pa.mail.comcast.net with comcast id ihCU1f0061uE5Es57l9g3v; Mon, 13 Dec 2010 21:09:40 +0000 Received: from [192.168.1.201] ([69.143.109.145]) by omta16.westchester.pa.mail.comcast.net with comcast id il9g1f00138FjT13cl9gtt; Mon, 13 Dec 2010 21:09:40 +0000 Message-ID: <4D068B93.2060609@christopherschultz.net> Date: Mon, 13 Dec 2010 16:09:39 -0500 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: [Mostly OT] Sweeping the permgen space: is that a good thing? References: <4D05F1E1.3000307@ashetic.net> In-Reply-To: <4D05F1E1.3000307@ashetic.net> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----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-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org