Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 89195 invoked from network); 5 Dec 2008 21:04:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2008 21:04:20 -0000 Received: (qmail 77441 invoked by uid 500); 5 Dec 2008 21:04:31 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 77422 invoked by uid 500); 5 Dec 2008 21:04:31 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 77411 invoked by uid 99); 5 Dec 2008 21:04:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 13:04:31 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_MED,RCVD_NUMERIC_HELO,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rick.blair@boeing.com designates 130.76.96.56 as permitted sender) Received: from [130.76.96.56] (HELO stl-smtpout-01.boeing.com) (130.76.96.56) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 21:02:59 +0000 Received: from slb-av-01.boeing.com (slb-av-01.boeing.com [129.172.13.4]) by stl-smtpout-01.ns.cs.boeing.com (8.14.0/8.14.0/8.14.0/SMTPOUT) with ESMTP id mB5L3ZNs016347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 5 Dec 2008 15:03:46 -0600 (CST) Received: from slb-av-01.boeing.com (localhost [127.0.0.1]) by slb-av-01.boeing.com (8.14.0/8.14.0/DOWNSTREAM_RELAY) with ESMTP id mB5L3ZwN016921 for ; Fri, 5 Dec 2008 13:03:35 -0800 (PST) Received: from XCH-NWBH-11.nw.nos.boeing.com (xch-nwbh-11.nw.nos.boeing.com [130.247.55.84]) by slb-av-01.boeing.com (8.14.0/8.14.0/UPSTREAM_RELAY) with ESMTP id mB5L3Ynk016880 for ; Fri, 5 Dec 2008 13:03:35 -0800 (PST) Received: from XCH-NW-5V1.nw.nos.boeing.com ([130.247.55.44]) by XCH-NWBH-11.nw.nos.boeing.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 5 Dec 2008 13:03:33 -0800 Received: from 144.112.32.53 ([144.112.32.53]) by XCH-NW-5V1.nw.nos.boeing.com ([130.247.55.49]) with Microsoft Exchange Server HTTP-DAV ; Fri, 5 Dec 2008 21:03:33 +0000 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Fri, 05 Dec 2008 13:03:31 -0800 Subject: Re: Broker not releasing memory From: Rick Blair To: Message-ID: Thread-Topic: Broker not releasing memory Thread-Index: AclXHO1gLC4+0sMQEd2aegAewgChCQ== In-Reply-To: <20828589.post@talk.nabble.com> Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3311327012_26805002" X-OriginalArrivalTime: 05 Dec 2008 21:03:33.0439 (UTC) FILETIME=[EED4BCF0:01C9571C] X-Virus-Checked: Checked by ClamAV on apache.org --B_3311327012_26805002 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Hi Will, We use an embedded broker Here is the url. tcp://{0}:{1}?jms.useAsyncSend=3Dfalse&jms.optimizeAcknowledge=3Dfalse&jms.pref= e tchPolicy.all=3D1000"; The problem started when optimizeAcknowledge=3Dtrue was used. Also I cannt get old messages in the topics to timeout. Some do, most don=B9t. Hope this helps. Rick --=20 T=ECoraidh! Rick Blair Associate Technical Fellow Boeing Phantom Works Network Systems Technology Information Management Program M/S: 42-50 Voice: (206) 544-1610 > From: Will van der Leij > Reply-To: > Date: Wed, 3 Dec 2008 23:32:31 -0800 (PST) > To: > Subject: Re: Broker not releasing memory >=20 >=20 > Hi Rick, > As I understand optimizeAcknowledge is disabled by default. Unfortunately= , > setting it explicitely has not had an affect on our memory usage. > Could you perhaps briefly describe the rest of your configuration? I'm > presuming that it is a combination of options that would do the trick. >=20 > Regards, > Will >=20 >=20 >=20 > Rick Blair wrote: >>=20 >> Hi Kirby, >>=20 >> We have seen exactly the same behaviour. As a work around we set >> optimizeAcknowdlege to false. I did not run down the root cause, howeve= r. >> =20 >> --=20 >> Cheers! >>=20 >> Rick Blair >>=20 >>=20 >>> From: "Frugia, Kirby A" >>> Reply-To: >>> Date: Wed, 3 Dec 2008 15:43:30 +0000 >>> To: "users@activemq.apache.org" >>> Conversation: Broker not releasing memory >>> Subject: RE: Broker not releasing memory >>>=20 >>> This is fairly easy to reproduce if you create one app which sends >>> messages >>> quickly and another which consumes the messages and sleeps before >>> ack'ing. >>> Once you see broker memory usage going up (through activemq-admin), kil= l >>> the >>> consumer application. Then run activemq-admin again some time later an= d >>> you'll see the same memorypercentusage. >>>=20 >>> Or, let the consumer run the broker out of memory and you'll see the >>> producer >>> get blocked. Kill both apps and you'll never see memory go back down >>> again >>> and you'll never be able to send messages again. >>>=20 >>> Thanks, >>> Kirby >>>=20 >>> -----Original Message----- >>> From: Will van der Leij [mailto:will@stonethree.com] >>> Sent: Wednesday, December 03, 2008 12:17 AM >>> To: users@activemq.apache.org >>> Subject: RE: Broker not releasing memory >>>=20 >>>=20 >>> Well, I'm reticent to suggest something going on under the hood without >>> taking a good look at it, however, if there is something wrong in the >>> broker >>> then I presume it has to do with a "sweeper"-like thread that >>> periodically >>> cleans up queues and topics that are left pending and consumerless >>> (similar >>> to how sweeper threads would clean up expired messages etc. >>>=20 >>> Then again, we are the only two that I know of describing this behaviou= r. >>> This suggests that either there is something bizarrely odd about our >>> configurations or we are, indeed, correct :) >>>=20 >>>=20 >>>=20 >>> Frugia, Kirby A wrote: >>>>=20 >>>> Yes, this is exactly what we are seeing. Any ideas? >>>>=20 >>>> -----Original Message----- >>>> From: Will van der Leij [mailto:will@stonethree.com] >>>> Sent: Thursday, November 27, 2008 11:42 PM >>>> To: users@activemq.apache.org >>>> Subject: Re: Broker not releasing memory >>>>=20 >>>>=20 >>>> We see similar behaviour in a slightly different setup so I'd like to >>>> elaborate a bit in the hope of finding out if this is either intended >>>> behaviour or a memory leak. >>>>=20 >>>> Essentially, with a single or multiple producers and a single or >>>> multiple >>>> consumers on a single topic: >>>> - We send messages faster than the consumer can read asynchronously >>>> - When the send queue is larger than the consumer's prefetch buffer >>>> then >>>> we correctly see messages filling up the broker memory >>>> (memoryPercentUSage in JMX) >>>> - Killing the consumer (cleanly through a close or not-cleanly with a >>>> terminate signal) >>>> results in the memoryPercentUsage not being released >>>> - even though there are no more consumers on the Topic >>>> - this memory is never released until the broker is restarted >>>>=20 >>>> I've tried it with persistence on and off, all the retroactive recover= y >>>> options on and off, flow control on and off, caching on and off, >>>> asynchronous dispatching on and off, noLocal flag on and off etc. >>>>=20 >>>> This is a very typical case of a consumer dying with inflight messages >>>> on >>>> the broker. Is the behaviour of the messages not being cleaned up or >>>> recovered intended (i.e. they are there for a reason) or is there >>>> soething >>>> wrnog with the setup. >>>>=20 >>>> Many thanks >>>> Will van der Leij >>>>=20 >>>>=20 >>>>=20 >>>> Frugia, Kirby A wrote: >>>>>=20 >>>>> Hi All, >>>>>=20 >>>>> Sorry I dual-posted in the dev list. I think I sent to the wrong >>>>> one... >>>>>=20 >>>>> We are seeing an issue with our broker not releasing memory on topics= . >>>>>=20 >>>>> Setup: >>>>> * Active MQ 5.1 (out of the box) >>>>> * Persistent messages sent by publishers >>>>> * Non-durable topics >>>>>=20 >>>>> We were seeing an issue in production with slow consumers causing the >>>>> broker to run out of memory. >>>>>=20 >>>>> We wrote a test app, which has one publisher and one subscriber to th= e >>>>> same topic. The publisher sends messages on this topic frequently. >>>>> The >>>>> subscriber, upon receiving a message, goes to sleep for 10 minutes. >>>>>=20 >>>>> Very quickly, the broker runs out of memory. When this happens, our >>>>> publishers can no longer send messages; the send is blocked. This is >>>>> expected. However, if we kill our application (which cleanly >>>>> disconnects >>>>> from the broker), the broker's memory usage (MemoryPercentUsage) does >>>>> not >>>>> go back down. Also, any new apps that startup will have their >>>>> publishers >>>>> blocked. >>>>>=20 >>>>> Shouldn't the broker release the memory associated with these message= s? >>>>>=20 >>>>> Thanks, >>>>> Kirby >>>>>=20 >>>>>=20 >>>>>=20 >>>>=20 >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Broker-not-releasing-memory-tp20662078p20730116.= html >>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>>=20 >>>>=20 >>>>=20 >>>=20 >>> -- >>> View this message in context: >>> http://www.nabble.com/Broker-not-releasing-memory-tp20662078p20808585.h= tml >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>=20 >>=20 >>=20 >>=20 >=20 > --=20 > View this message in context: > http://www.nabble.com/Broker-not-releasing-memory-tp20662078p20828589.htm= l > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >=20 --B_3311327012_26805002--