[rabbitmq-discuss] How to debug queue memory leak
Matthias Radestock
matthias at rabbitmq.com
Mon Jan 28 08:19:42 GMT 2013
On 28/01/13 00:53, Max Kuznecov wrote:
> rabbitmqctl report output: http://pastebin.com/7xuebg84
>
> And the process_info of the queue with highest memory usage:
Do you remember what the pid was of that queue? So I can correlate that
with the report output.
Anyway, it looks like all the queues with a high memory usage are
slow-moving. Since garbage collection is triggered based on the
reduction count, that means they can hold on to a fair amount of memory.
By contrast, idle queues go into hibernation, which compacts their memory.
We introduced a background gc in 3.0.0, which should control the memory
consumption of slow moving queues and other lightly-used processes.
However, it runs at most once per minute, less frequently if gc takes a
long of time. I wonder whether that is too infrequent for your usage
pattern.
This may be particularly an issue when the messages are large. What's
the average message size passing through the queues?
One way to check whether (lack of) gc is an issue, is to perform an
explicit gc on the process with
rabbitmqctl eval 'garbage_collect(rabbit_misc:string_to_pid("<ThePid>")).'
and see whether that drops the memory usage significantly.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list