Menu

Memory and Disk Alarms

Overview

There are two circumstances under which RabbitMQ will stop reading from client network sockets, in order to prevent crashes. They are:

  • When memory use goes above the configured limit.
  • When disk space drops below the configured limit.

In both circumstances the server will temporarily block connections - the server will pause reading from the sockets of connected clients which publish messages. Connection heartbeat monitoring will be disabled too. All network connections will show in rabbitmqctl and the management plugin as either blocking, meaning they have not attempted to publish and can thus continue or blocked, meaning they have published and are now paused.

Alarms in Clusters

When running RabbitMQ in a cluster, the memory and disk alarms are cluster-wide; if one node goes over the limit then all nodes will block connections.

The intent here is to stop producers but let consumers continue unaffected. However, since the protocol permits producers and consumers to operate on the same channel, and on different channels of a single connection, this logic is necessarily imperfect. In practice that does not pose any problems for most applications since the throttling is observable merely as a delay. Nevertheless, other design considerations permitting, it is advisable to only use individual connections for either producing or consuming.

Running Out of File Descriptors

When the server is close to using all the file descriptors that the OS has made available to it, it will refuse client connections. See Networking guide to learn more.

When clients attempt to publish faster than the server can accept their messages, they go into transient flow control.

Getting Help and Providing Feedback

If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them on the RabbitMQ mailing list.

Documentation feedback is also very welcome on the list. If you'd like to contribute an improvement to the site, its source is available on GitHub.