Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 82003 invoked from network); 14 Nov 2010 03:59:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Nov 2010 03:59:22 -0000 Received: (qmail 52427 invoked by uid 500); 14 Nov 2010 03:59:50 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 52326 invoked by uid 500); 14 Nov 2010 03:59:50 -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 52317 invoked by uid 99); 14 Nov 2010 03:59:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Nov 2010 03:59:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [76.13.13.40] (HELO smtp101.prem.mail.ac4.yahoo.com) (76.13.13.40) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 14 Nov 2010 03:59:41 +0000 Received: (qmail 52073 invoked from network); 14 Nov 2010 03:59:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=JGOkmbdWnArY22sehFT5tSmSyM989JnKEvOPfwSPaTUEHYKYz2XXjzdZBP5EMwk+GkBDjlUwGC2obKhu82Q6/kRUzQRd5yq4eR9yYygyQLmGWn6IF6HII3GD9ywsxh3gbc9na4Fx8nxQEwpyzxctQNbZjYzmLaBaLOAUDPSP5cA= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1289707159; bh=Azfwo72sQrhfRaS0Ub9DKzEa2STX8XBL3/pvYrt5dkE=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=0DQaoqNNAnk04xuMj7ABkVkLuXPC3qEXDm+mrXEZ6w869uW0UNwyFTUKUI60fMxEmWFjGfpAyeSAzd/W+ZtAsyeX/kyR8RT3iDUaM9K+wI+E/HzK1Tc179r0HKRQpUWVv7EnDbhx0/9xguuW/wQNppgM+jmCYcai4XsSje9oKPs= Received: from BBW7 (bbprefix-mail@190.233.215.101 with login) by smtp101.prem.mail.ac4.yahoo.com with SMTP; 13 Nov 2010 19:59:19 -0800 PST X-Yahoo-SMTP: tozTPAqswBADGlZnplBDlcm0Dpndo4ZqE94JOFM- X-YMail-OSG: rZX4gN4VM1m1i3VPpkHsvYGOmff12MzU6LS.PzWLX048h0C 6OSCf699Qw5_g99nYgfLYcsy6pw_So1X61nWFmEIxjoRI3mq3q6ejQW2CQpU JhZ0tzJqqXAlEky3E6LoijLHnbdflIvIJBg7c7jVVo5cVKaiV2jyhuKC5MnR v1a6UxJwfaGGuaUYn5Gl8QH_3LRmdtyBqANtZnfKwytLF5yZHGcwcT6MqHks X6o0.qXU3Y.mXOPgz46c6YjmcosAy1rSDedhFSTUs_NRlDQyJE9QSPkPmsaT bKo8tarqe1NOBPRTbacrmRsP3dGuH1RrGZnSXDGC52cOmSF0- X-Yahoo-Newman-Property: ymail-3 From: "Brian" To: "'Tomcat Users List'" References: <014f01cb81d1$d3460340$79d209c0$@yahoo.com> <99C8B2929B39C24493377AC7A121E21F99F8B4E205@USEA-EXCH8.na.uis.unisys.com> <020f01cb8295$596acaa0$0c405fe0$@yahoo.com> <4CDD84F7.9010908@apache.org> <021001cb8297$c13af450$43b0dcf0$@yahoo.com> <4CDD89A1.7070505@apache.org> <021a01cb829d$879e0e70$96da2b50$@yahoo.com> <4CDD932C.40103@apache.org> <023201cb82a9$368179d0$a3846d70$@yahoo.com> <4CDE8292.5010009@apache.org> In-Reply-To: <4CDE8292.5010009@apache.org> Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? Date: Sat, 13 Nov 2010 22:59:09 -0500 Message-ID: <001801cb83b0$4b7a2550$e26e6ff0$@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKW4xfE0ZIreY1yEiORcXvdSO2x1QI2gFZLAuA2eAYBT1Rf+QGV6mRsAmNSKqoCKvYCLgFpvkIjAYfc9mcBq1dFb5FQVivw Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org Hi Mark, This is interesting. I got a snapshot of the memory. I found just about 91 instances of this class (org.apache.jasper.runtime.BodyContentImpl). Just 91, so I guess the quantity of buffers at the same time is small, maybe they belong to a pool and the maximum quantity of objects in the pool is 100? I'm just guessing. Well, one of them was as big as 18MB! The second one almost the same.... about the first 10 of them where HUGE. Then the rest where more reasonable, between 1 and 50KB. How can a page in my site be as big as 18MB? It definitely can't happen. But for some reason, the buffer was that big in a certain point of time. I inspected the content of them, and they were not huge inside, just a few KB of HTML code inside and the rest was spaces or some invisible character. I mean, these instances of the class contained a huge array of chars, buf only the first hundreds/thousands of them contained HTML code, but given that the busfferSize variable contained a big value (18 millons), the object thought it had a huge full buffer containing real values. I guess something wrong happened, maybe an exception ocurred or I undeployed my app at that very moment (or something else went wrong) and this huge buffers got wrongly full of dummy characters and then stayed in the limbo, until the GB would delete them? Or now that I think more about it, they stayed in the memory to be reused again, being objects in a pool, their "nextChar" variable (a pointer) was reset to a small value, but their hugely increased internal array of chars was going to stay as big as the biggest they were... like you said. I will set the LIMIT_BUFFER value now, I guess that will solve it as you said. When the buffer gets cleared after it is being used every time, and the LIMIT value =true, the buffer will shrink to 512 bytes again, huh? That will be nice. :-) > -----Original Message----- > From: Mark Thomas [mailto:markt@apache.org] > Sent: Saturday, November 13, 2010 07:21 AM > To: Tomcat Users List > Subject: Re: Tomcat 6.0.29 using more and more RAM until it collapses? > > On 12/11/2010 20:35, Brian wrote: > > Ok, I will do that now! > > > > I have taken another snapshot of the JVM a few minutes ago. Now I also > > see that 160MB are being used by > org.apache.jasper.runtime.BodyContextImpl. > > This contains images of my DYNAMIC pages! > > That is sort of what I'd expect. A little background: > > Tag bodies have to be buffered. > Jasper (Tomcat's JSP engine) uses a pool of buffers. > Tag bodies are expected to be small. > The buffer grows (but does not shrink) if the body is large. > > If you have a lot of tags that have large bodies then you can see an increase in > memory usage in this area. To control this see > org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER on > http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html > > HTH, > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org