Reduce RabbitMQ memory usage

The appropriate way to limit memory usage in RabbitMQ is using the vm_memory_high_watermark. You said:

I’ve also tried setting the
vm_memory_high_watermark to a few
different values below the default (of
40%), even as low as 5%.

This should work, but it might not be behaving the way you expect. In the logs, you’ll find a line that tells you what the absolute memory limit is, something like this:

=INFO REPORT==== 29-Oct-2009::15:43:27 ===
Memory limit set to 2048MB.

You need to tweak the memory limit as needed – Rabbit might be seeing your system as having a lot more RAM than you think it has if you’re running on a VPS environment.

Sometimes, Rabbit can’t tell what system you’re on and uses 1GB as the base point (so you get a limit of 410MB by default).

Also, make sure you are running on a version of RabbitMQ that supports the vm_memory_high_watermark setting – ideally you should run with the latest stable release.

Leave a Comment