[rabbitmq-discuss] [help] [beginner] server stops sending messages; publish (in transaction) hangs on commit

Alistair Bayley alistair at abayley.org
Thu Feb 23 16:58:19 GMT 2012


On 24 February 2012 01:01, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 23/02/12 11:34, Marek Majkowski wrote:
>>
>> You seem to have quite a small amount of RAM - 100MiB, right?
>>
>> Do logs show high memory watermark being set?
>
>
> More to the point, the OP's "rabbitmqctl report" output shows memory use
> above the watermark. So yes...
>
>
>> If so: rabbitmq tries not to go above a memory limit.
>> When rabbit hits memory limit it stops consuming messages -
>
>
> As in, it will block on message publish. In tx mode that equates to a
> commit.
>
>
>> all connections that produce messages will be stopped.
>> The connection won't be touched until some memory is freed.
>>
>> But in setups where total memory is small, RabbitMQ may
>> enter a state of just being above memory watermark and not
>> being able to free anything. This may be happening to you.
>
>
> ...and you can set vm_memory_high_watermark higher to work around this. See
> http://www.rabbitmq.com/memory.html.

Thanks.

Why is it not able to free memory? A rabbitmqctl report on a freshly
started server shows total memory about 10M, what causes it to grow
and not shrink back? This server is currently doing literally nothing
- all queues are empty - so I'd like to know why total memory doesn't
drop back down to something close to the initial state.

It is running on a deliberately small VM. As it is the only service on
the VM (the VM exists solely to host rabbitmq) we can increase the
vm_memory_high_watermark . I would try 80%, is there a reason to go
higher (or not)?.

Alistair


More information about the rabbitmq-discuss mailing list