Changing RabbitMQ default timeout from 30 minutes

The default timeout for an operation with RabbitMQ is 30 minutes, which can cause problems with larger jobs. To change this the rabbitmq.config file needs to be updated with the consumer_timeout command. This is specified in milliseconds and is therefore a very large number.

Here are some examples of times you can use:

  • 30 minutes - 1800000 ms (default value)
  • 1 hour - 3600000 ms
  • 3 hours - 10800000 ms
  • 6 hours - 21600000 ms
%% -*- mode: erlang -*-
%% ----------------------------------------------------------------------------
[
{rabbit,
    [
        %% Log levels (currently just used for connection logging).
        %% One of 'info', 'warning', 'error' or 'none', in decreasing order
        %% of verbosity. Defaults to 'info'.
        %%
        {log_levels, [{connection, error}]},
        {consumer_timeout, [21600000]}
    ]}
].
  • Last modified: 2 months ago
  • by Alvar Berglind