Maintain RabbitMQ

Access the management interface

If the management interface is not publicly available:

  1. Open an SSH tunnel, replacing HOST:

    ssh -N root@HOST -L 15673:localhost:15672
    
  2. Open http://localhost:15673

The Queues tab is the most relevant, to monitor the progress of work. On each queue’s page, you can:

  • See the queue’s message rate to estimate when work will complete

  • Purge a queue (that is, remove all messages)

  • Add a message to the queue for debugging

Reference:

Review log files

RabbitMQ log files are at /var/log/rabbitmq/. rabbit@<hostname>.log is the main file. erl_crash.dump describes the latest crash.

Check memory use

If erl_crash.dump contains “Slogan: eheap_alloc: Cannot allocate 123456789 bytes of memory (of type “heap”).”, you can monitor its memory usage and change its memory thresholds as needed.

Troubleshoot

  • Purging a queue does not purge unacked messages. Before purging, stop all consumers to close their channels, which will return the unacked messages to the queue.

  • If you created a binding in error, you must delete the binding, because bindings are persistent. Deleting the queue also deletes the binding.