Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 74287 invoked from network); 15 Jun 2006 14:04:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jun 2006 14:04:38 -0000 Received: (qmail 19230 invoked by uid 500); 15 Jun 2006 14:04:38 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 19202 invoked by uid 500); 15 Jun 2006 14:04:37 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 19193 invoked by uid 99); 15 Jun 2006 14:04:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2006 07:04:37 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2006 07:04:36 -0700 Received: by ug-out-1314.google.com with SMTP id m3so1036935uge for ; Thu, 15 Jun 2006 07:04:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m+yUJDAFohbMMqS9nVLJ9OsaDamrLApJ0Enx0YRTUoihgo7waMMbZLiqPkwISEeOIhAZ4L/ArOUZJBRLlmPj4b3QZNqA7Ei7ZUdGcssQEy9cFJ/geWXn7UpLHGP2KbgF0mg6sU0MbYqRu96zpQwGDhOfpzM2AeZlkQUjrxgWk+w= Received: by 10.66.222.9 with SMTP id u9mr1766683ugg; Thu, 15 Jun 2006 07:04:15 -0700 (PDT) Received: by 10.66.255.17 with HTTP; Thu, 15 Jun 2006 07:04:15 -0700 (PDT) Message-ID: Date: Thu, 15 Jun 2006 15:04:15 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: limit the number of messages per second In-Reply-To: <001FD7EB9646934B9237F09DE8E1F07C02F8C147@DE0-MAILMB02.res.airbus.corp> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <001FD7EB9646934B9237F09DE8E1F07C02F8C147@DE0-MAILMB02.res.airbus.corp> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is there any way you can create a test case that manages to crash the broke= r? On 6/15/06, Gerdes, Mike wrote: > > hm I will try to use prefetch and see if it works, but mostly the problem= is not the consumer, but the sender and the broker having to manage everyt= hing. > > The broker crashes or better it gets a deadlock. So the usagemanagers for= the queues request more memory and get it, at some point in time all memor= y is used up and they request more and wait till they get it. That never ha= ppens, because the reference co=FAnters don'T get reduced and they think th= e queue is totally full. At that point the sender also stops and waits for = the queue to free. > > I am using SSL and JAAS to allow only nodes that I trust to publish to th= e system, but when systems get bigger a misconfiguration might occure or so= mebody finds a trick or a way around it. It is not that critical but would = be very nice to have. > > I am using AMQ4.0 the SNAPSHOT 01.05.2006. I have tried to use persistent= and non-persistent messages, that makes no change. > > I haven't found the options on how to set it, that was before you added t= he warning and send this email, so I will try it and hope thats the problem= . > > > -----Urspr=FCngliche Nachricht----- > Von: James Strachan [mailto:james.strachan@gmail.com] > Gesendet: Donnerstag, 15. Juni 2006 15:45 > An: activemq-users@geronimo.apache.org > Betreff: Re: limit the number of messages per second > > > > On 6/15/06, Gerdes, Mike wrote: > > > > I want this feature to make AMQ a bit more stable, to reduce network tr= affic and prevent flooding and to avoid that a software with errors kills m= y system. > > You can use the prefetch for that... > http://incubator.apache.org/activemq/what-is-the-prefetch-limit-for.html > > to limit how many messages are dispatched to a consumer. > > > > From what I noticed is that AMQ does have some memory problems and that= it hits under certain circumstances 100 used memory and crashes then. > > Whats the crash? Is this the broker or client? > > > But thats the smaller reason. The major reason is just for security. I= n my testing and application I need to have a system that is more or less s= table and secure. And DoS and flooding of queues seems to me a big problem. > > How about using security so only nodes you trust can publish to your queu= es? > > > One thing about the memory problem, I have encountered. With more then = one consumer and using queue, AMQ crashes with 100% used memory if I send a= s fast as possible. This happens with and without async messages. What I no= ticed is that the usageManagers request more and more memory and at some po= int don't get it and then block. When a message from a queue is read, its m= emory is not freed. With only on consumer this haven'T been the case. There= has the memory be freed. > > (I put reference counter System.out.println into the usageManger) > > Which version of ActiveMQ are you using? Also are you using persistent > queues? (I'm guessing not as that is not memory bound). > > If you are using 4.0 have you disabled optimizeAck? (see the known issues= ) > http://incubator.apache.org/activemq/activemq-40-release.html > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > > This mail has originated outside your organization, > either from an external partner or the Global Internet. > Keep this in mind if you answer this message. > > This mail has originated outside your organization, either from an extern= al partner or the Global Internet. Keep this in mind if you answer this mes= sage. > --=20 James ------- http://radio.weblogs.com/0112098/