Memory and Disk Alarms

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

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.

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 AMQP 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 AMQP connections for either producing or consuming.

Related concepts

  • When the server is close to using all the file descriptors that the OS has made available to it, it will refuse client connections altogether.
  • When clients attempt to publish faster than the server can accept their messages, they go into flow control.