[rabbitmq-discuss] pika behavior when server die

Gavin M. Roy gmr at myyearbook.com
Sat Apr 23 15:47:00 BST 2011


On Saturday, April 23, 2011 at 6:16 AM, can xiang wrote: 
> 5. no_ack = True
> 6. SimpleReconnectionStrategy for reconnection
> 
> When I'm testing the server die scenario. I found three issues:
> 
> ISSUE 1:
> =======
> Stop rabbitmq server, tornado application raises the following exception and become not responsive:
> 
> error: [Errno 111] Connection refused
Hmm interesting point in that. I don't think I've used the SRS+Tornado combination. The exception is expected. Please open an issue at http://github.com/pika/pika and I'll see if I can get a fix so SRS can work. 
> ISSUE2:
> =======
> I tested 800 messages, with slow consumer. while it runs, stop rabbitmq-server with Ctrl+C, consumer is able to continuing consuming message and finish all 800 messages, then it EXIT.
> 
> It's very weird indeed, because the server already gone. Is there any incoming message buffer in pika?
There is an inbound buffer.
> How many messages can be buffered? 
> 

Never tested for an upward limit on this.
> Are those message stored in memory?
> 

Yes
Is it possible to configure the memory usage?

No.

I would switch to using Basic.Ack and control when you get a message instead of have the server throw them at you.
> 
> ISSUE3:
> =======
> In my use case, it's very important the tornado application wouldn't die for any reason. If there is anything bad happened to the rabbitmq-server or connection, messaging system can be down-graded as a not functioning part, which can go back automatically when server issues resolved. The long running consuming process shouldn't die or exit when server died or connection broken. Is this requirement sensible enough? 
> 
> I hope SimpleReconnectionStrategy works for my case, which is not. Is there anything wrong in my application code? Or I just roll my own one, any suggestion on how to do it?
It should, I think I'm missing catching the exception here. Please open the issue and I'll see if we can get a fix into 0.9.6 which is ready to be released pending documentation updates.

Thanks,

Gavin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110423/e786395e/attachment.htm>


More information about the rabbitmq-discuss mailing list