3

I am experiencing a problem with rabbitmq 2.8.5. There are 3 queues that messages are published to and they are consumed relatively quickly by the consumers. So the queues aren't big at all. There are 3 exchanges one for each queue. However the memory on rabbitmq continues to grow.

I tried running two different commands to understand what was happening to the memory however rabbitmq would hang when i run them.

rabbitmqctl eval '[[{pid, R}, M | process_info(R)] || {M, R} <- 
lists:sublist(lists:reverse(lists:sort([{process_info(P, memory), P} || 
P <- erlang:processes()])), 10)].'

'lists:sublist(lists:reverse(lists:sort([{process_info(Pid,memory), Pid, 
sys:get_status(Pid,infinity)} || Pid <- [element(7, Q) || Q <- 
rabbit_amqqueue:list()]])), 10).'

I then tried to observe the memory usage on the erlang vm that rabbitmq is running on and it 9235 (I think its in bytes).

So if the queues and exchanges aren't large and Erlang Ram is far below that of rabbitmq what could be the cause?

As the Memory usage continues to grow it eventually reaches the max memory water mark and no more publishing can occur.

4

1 回答 1

0

也许您应该检查每条消息的大小作为有效负载。所有消息都将存储在内存中。

如果太大,最好重新设计消息。

于 2013-04-24T10:07:47.850 回答