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

Alistair Bayley alistair at abayley.org
Thu Feb 23 20:00:36 GMT 2012


On 24 February 2012 06:57, Simon MacMullen <simon at rabbitmq.com> wrote:
>
> The report you posted showed most memory in the VM being used by Erlang
> processes. You could run something like:
>
> rabbitmqctl eval
> 'lists:sublist(lists:reverse(lists:sort([{process_info(Pid,memory), Pid,
> process_info(Pid)} || Pid <- processes()])), 10).'
>
> to list the top 10 processes by memory use, along with some information for
> each one. This may tell us something interesting.

Just ran this:

$ sudo rabbitmqctl eval
'lists:sublist(lists:reverse(lists:sort([{process_info(Pid,memory),
Pid, process_info(Pid)} || Pid <- processes()])), 10).'

(wait for a bit - about 30s or so...)

Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 153052320 bytes of memory (of type "old_heap").
Aborted
$

hmmm....


> Having said that, 100Mb for an idle server does not seem totally
> unreasonable - RabbitMQ is not optimised for small memory use when idle.

OK. Can I have some guidance as to how much memory we should allocate?
The ubuntu VMs we use have 256M by default; this is usually more than
enough for our needs. Is that enough for rabbitmq? Let's assume that
we have a small number of queues (6 or so) and the queues will contain
a small number (in the 100s) of fairly small messages (a few hundred
bytes each). The consumers are aggressive; messages should not remain
on queues for long, although they are persistent.

I don't see much in the docs about memory requirements. I think I'll
start by setting the vm_memory_high_watermark to 0, and seeing where
the memory use plateaus (assuming it does).

Also, I see from the tcpdump capture that the server does not send
back a response to the Tx.Commit, which presumably makes it difficult
for the client to detect that the message has not been accepted (other
than timeout). Indeed, the basic_publish returns nothing immediately,
although that could be a feature of the amqplib library. Is there an
option to get the server to return something that says that it is not
accepting messages?

Thanks,
Alistair


More information about the rabbitmq-discuss mailing list