[rabbitmq-discuss] Slow shutdown issue

Raymond Murthi rmurthi at gilt.com
Sun Jul 24 22:02:57 BST 2011


Hi Marek/Matthew, 

Thank you for your replies. They have been really helpful for me. I did further tests and everything looks much clearer now.

@Marek: yup, I explicitly overloaded the queue to understand where messages go after the memory is used up. I suppose it could also happen when all consumers somehow stop consuming or in faster publisher/slow consumer scenarios. We would like to put some monitoring in place to prevent that from happening though.  

@Matthew: Does declaring queue as exclusive mean that the broker can only accept one connection to the queue? If so, isn't it preventing both sender and consumer to connect to the queue at the same time? I tried and as expected, I got an exception for doing so.


-Ray

On Jul 22, 2011, at 4:59 AM, Marek Majkowski wrote:

> Hi,
> 
> I don't know the answers to all your questions.
> 
> On Thu, Jul 21, 2011 at 20:18, Raymond Murthi <rmurthi at gilt.com> wrote:
>> I am pretty new on RabbitMQ and I am trying to do a stress test on RabbitMQ (v. 2.5.1) using the following properties: 1kb persistent message, nondurable queue, and without any ready consumer (that is, just writing to the queue). However, every time I overload the RAM (13.7GB high watermark) and force RabbitMQ to write to disk, I always experience a very long wait time whenever I want to shutdown the server/stopping the app/purging the queue. The wait time could be over an hour depending on the number of messages I sent (I sent over 5 millions messages). I  also notice that RabbitMQ tries to dump the messages from the memory to the disk (under /msg_store_transient) - since nothing is consumed.
> 
> This is quite a hard thing for rabbit - you're using it as a database
> rather than messaging system!
> 
>> Is it a common behavior? I read the documentation and it looks like it is (but isn't it too long?).
>> How to kill the process immediately?
> 
> I can only suggest what you already know: queue_purge or queue_delete.
> 
>> And why are messages stored under /msg_store_transient instead of /msg_store_persistent? What  is the difference between the two directories?
> 
> You said you are sending messages to a nondurable queue - so in a case
> of broker shutdown, the queue will be lost. If you want to use
> persistance, you need to send persistent messages to a durable queue.
> That's why you see messages in the msg_store_transient.
> 
> I would be interested to hear what are the results of your test for
> persistent/durable messages!
> (though rabbit will probably initally be slower)
> 
>> I would like to understand on the memory/disk usage and how messages are stored.
> 
> Cheers,
>  Marek

Thanks, 
-Ray



More information about the rabbitmq-discuss mailing list