[rabbitmq-discuss] intermittent erl.exe crash

Matthew Sackman matthew at lshift.net
Tue Nov 10 15:12:25 GMT 2009


On Fri, Nov 06, 2009 at 02:09:38PM -0800, JD Conley wrote:
> It seems like it ran out of memory. How much memory overhead is there per
> queue/stored message? I might need to make my timeout sweeping more
> aggressive, or bring up more instances.

It entirely depends on the size of the messages. Also note that until
you ack a message explicitly, or set the NoAck option on consumption,
Rabbit will not forget about messages.

> Or, more likely, my queue configuration or consuming code is wrong and my
> messages are being stored forever in memory causing the memory leak. Here
> are some c# snippets:
> 
> //start consuming
> _model.QueueDeclare(userQueue, false, false, false, false, false, null);
> consumerTag = _model.BasicConsume(userQueue, true, null, _consumer);

Ok, you're setting noAck true, so you shouldn't need to ack explicitly.

> //publish message
> var props = _model.CreateBasicProperties();
> props.Expiration = "5000"; //is this right? desired expiration time is 5
> seconds.
> _model.BasicPublish(_exchange, key, false, false, props, body);

Expiration is not implemented. There is no notion of Time To Live or
messages expiring in RabbitMQ. This is an oft requested feature and is
high on our todo list, but is not in active development yet.

> Crash dump was written to: erl_crash.dump
> temp_alloc: Cannot allocate 9176036 bytes of memory (of type "tmp_heap").

Err, that's odd, that's only about 8MB of RAM. How much RAM do you have
in this machine that's available to Rabbit? Also, before it crashes,
run:
rabbitmqctl list_queues name messages messages_unacknowledged memory

as that might give you some more information.

Matthew




More information about the rabbitmq-discuss mailing list