Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 38846 invoked from network); 27 Dec 2005 09:31:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Dec 2005 09:31:00 -0000 Received: (qmail 29327 invoked by uid 500); 27 Dec 2005 09:30:45 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 29312 invoked by uid 500); 27 Dec 2005 09:30:44 -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 29301 invoked by uid 99); 27 Dec 2005 09:30:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2005 01:30:44 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.205.163.200] (HELO mail.teztour.com) (62.205.163.200) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2005 01:30:43 -0800 Received: from localhost (unknown [127.0.0.1]) by mail.teztour.com (Postfix) with ESMTP id 7172214DE84 for ; Tue, 27 Dec 2005 12:30:21 +0300 (MSK) Received: from mail.teztour.com ([127.0.0.1]) by localhost (mail.teztour.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11244-07 for ; Tue, 27 Dec 2005 12:30:18 +0300 (MSK) Received: from TEZTOUR-5CCE7F0 (unknown [10.1.1.18]) by mail.teztour.com (Postfix) with ESMTP id C634314DE88 for ; Tue, 27 Dec 2005 12:30:18 +0300 (MSK) Date: Tue, 27 Dec 2005 12:30:18 +0300 From: =?ISO-8859-1?B?wO3k8Ojl4vHq6OkgxOzo8vDo6Q==?= X-Mailer: The Bat! (v2.12.00) Personal Reply-To: =?ISO-8859-1?B?wO3k8Ojl4vHq6OkgxOzo8vDo6Q==?= Organization: teztour X-Priority: 3 (Normal) Message-ID: <289536331.20051227123018@teztour.com> To: "Tomcat Users List" Subject: Re[2]: About possible memory leak in Tomcat 5.x In-Reply-To: References: <20051215121531.70052.qmail@web30801.mail.mud.yahoo.com> <8110453586.20051219115846@teztour.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at teztour.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Anoop, > I hope you will have the tomcat developers look into this by sending this to > tomcat-developers forum. I did, and they have already fixed it up in one of recent svn (is it the same as cvs?..) commit. May be not because of my letter, though :) 20.dec.05: subject: svn commit: r358036 - in /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime: BodyContentImpl.java JspFactoryImpl.java > Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java > URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java?rev=358036&r1=358035&r2=358036&view=diff > ============================================================================== > --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java (original) > +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Tue Dec 20 09:02:33 2005 > @@ -40,9 +40,10 @@ > private Log log = LogFactory.getLog(JspFactoryImpl.class); > > private static final String SPEC_VERSION = "2.0"; > - private static final boolean USE_POOL = true; > + private static final boolean USE_POOL = > + Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL", "true")); Monday, December 26, 2005, 9:24:37 AM, you wrote: > I think this is a great finding - it will certainly help all those teams > faced with the Out of memory errors which curiously pops up oly after we > move the code to production.. > I hope you will have the tomcat developers look into this by sending this to > tomcat-developers forum. > THanks, > Anoop > On 12/19/05, Andrievsky Dmaitry wrote: >> >> Hello users, >> >> About a half a year ago I've found that my webapp works fine in >> development environment, but leaks memory in production one. >> I've searched through all the code, found a few minor errors, but it >> didn't help. >> (of course, tag pooling are disabled completely) >> >> So then i've tried to use profiler, looking on alien classes. >> (I've tried before too, but my attention was concentrated on my own >> classes) >> >> And then i've found lots of >> org.apache.jasper.runtime.PageContextImpl >> from which there were a lot of references to the objects, that i've >> treated as dead. >> >> >> All PageContextImpl's lived at >> org.apache.jasper.runtime.JspFactoryImpl.pool >> >> >> There are property of org.apache.jasper.runtime.JspFactoryImpl, named >> USE_POOL, which rules pool usage, but it is private, >> and i've not found any way to set it to "false" from outside. >> Initially it's "true". >> >> So, i've set it to "false" directly in code, >> rebuilt tomcat and replaced files >> ${CATALINA_HOME}/common/lib/jasper-*.jar >> from production environment with fresh ones. >> >> So, it seems that the problem is successfully solved. >> As far as I can see there no more memory leakage. >> >> I think it would be useful to allow users to set property of >> org.apache.jasper.runtime.JspFactoryImpl.USE_POOL from config files or >> in any other way, without rebuilding entire tomcat application. >> >> P.S. >> In fact, I think, it's not REAL memory leak - memory usage, may be, >> will stop grow on some large value (2+ GB, when pool become full), but i >> have not such >> amount of memory. >> Now memory usage about 100-200 mb after full gc, depending on amount >> of currently working users. >> >> P.P.S What seems to me interesting. >> Although before putting PageContextImpl into pool JspFactoryImpl calls >> pc.release(), and inside the method all links must become null (or >> not?..) and referenced objects must become available to gc, they are not. >> May be it is the root of the problem?.. >> >> BTW disabling of pool solves the problem completely... >> >> >> -- >> Best regards, >> Dmitry Andrievsky mailto:dimmik@teztour.com >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> > -- > Thanks and best regards, > Anoop -- Best regards, ������� ����������� mailto:dimmik@teztour.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org