Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 35699 invoked from network); 2 Dec 2008 15:39:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 15:39:04 -0000 Received: (qmail 24414 invoked by uid 500); 2 Dec 2008 15:39:15 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 24269 invoked by uid 500); 2 Dec 2008 15:39:15 -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 24254 invoked by uid 99); 2 Dec 2008 15:39:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 07:39:14 -0800 X-ASF-Spam-Status: No, hits=-3.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [15.216.28.35] (HELO g1t0028.austin.hp.com) (15.216.28.35) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 15:37:43 +0000 Received: from G5W0603.americas.hpqcorp.net (g5w0603.americas.hpqcorp.net [16.228.9.186]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g1t0028.austin.hp.com (Postfix) with ESMTPS id 51DED1C224 for ; Tue, 2 Dec 2008 15:38:30 +0000 (UTC) Received: from G6W0173.americas.hpqcorp.net (16.230.33.182) by G5W0603.americas.hpqcorp.net (16.228.9.186) with Microsoft SMTP Server (TLS) id 8.1.263.0; Tue, 2 Dec 2008 15:37:56 +0000 Received: from GVW0676EXC.americas.hpqcorp.net ([16.230.33.208]) by G6W0173.americas.hpqcorp.net ([16.230.33.182]) with mapi; Tue, 2 Dec 2008 15:37:56 +0000 From: "Frugia, Kirby A" To: "users@activemq.apache.org" Date: Tue, 2 Dec 2008 15:37:55 +0000 Subject: RE: Broker not releasing memory Thread-Topic: Broker not releasing memory Thread-Index: AclRLOid1kqfqMWSQki9ykNQR07XywDZuJMA Message-ID: <57A2B54B882D5C47B57259B7282A19FF16784A10B4@GVW0676EXC.americas.hpqcorp.net> References: <57A2B54B882D5C47B57259B7282A19FF16782BC162@GVW0676EXC.americas.hpqcorp.net> <20730116.post@talk.nabble.com> In-Reply-To: <20730116.post@talk.nabble.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Yes, this is exactly what we are seeing. Any ideas? -----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 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. 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 I've tried it with persistence on and off, all the retroactive recovery options on and off, flow control on and off, caching on and off, asynchronous dispatching on and off, noLocal flag on and off etc. 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. Many thanks Will van der Leij Frugia, Kirby A wrote: > > Hi All, > > Sorry I dual-posted in the dev list. I think I sent to the wrong one... > > We are seeing an issue with our broker not releasing memory on topics. > > Setup: > * Active MQ 5.1 (out of the box) > * Persistent messages sent by publishers > * Non-durable topics > > We were seeing an issue in production with slow consumers causing the > broker to run out of memory. > > We wrote a test app, which has one publisher and one subscriber to the > same topic. The publisher sends messages on this topic frequently. The > subscriber, upon receiving a message, goes to sleep for 10 minutes. > > 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. > > Shouldn't the broker release the memory associated with these messages? > > Thanks, > Kirby > > > -- View this message in context: http://www.nabble.com/Broker-not-releasing-me= mory-tp20662078p20730116.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.