Skip to content

Commit 09c8cd4

Browse files
author
Loïc Hoguin
committed
Increase classic queue shutdown timeout
A value that is too low will prevent the index from shutting down in time when there are many queues. This leads to the process being killed and on the next RabbitMQ restart a (potentially very long) dirty recovery is needed. The value of 10 minutes was chosen to mirror the shutdown timeout of the message store. Since both queues and message store need to have shut down gracefully in order to have a clean restart it makes sense to use the same value. Related: c40c262
1 parent 8cc9806 commit 09c8cd4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

deps/rabbit/src/rabbit_amqqueue_sup.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ start_link(Q, StartMode) ->
2424
Marker = spawn_link(fun() -> receive stop -> ok end end),
2525
ChildSpec = {rabbit_amqqueue,
2626
{rabbit_prequeue, start_link, [Q, StartMode, Marker]},
27-
intrinsic, ?WORKER_WAIT, worker, [rabbit_amqqueue_process,
28-
rabbit_mirror_queue_slave]},
27+
intrinsic, ?CLASSIC_QUEUE_WORKER_WAIT, worker,
28+
[rabbit_amqqueue_process, rabbit_mirror_queue_slave]},
2929
{ok, SupPid} = supervisor2:start_link(?MODULE, []),
3030
{ok, QPid} = supervisor2:start_child(SupPid, ChildSpec),
3131
unlink(Marker),

deps/rabbit_common/include/rabbit.hrl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@
225225
-define(SUPERVISOR_WAIT,
226226
rabbit_misc:get_env(rabbit, supervisor_shutdown_timeout, infinity)).
227227
-define(WORKER_WAIT,
228-
rabbit_misc:get_env(rabbit, worker_shutdown_timeout, 30000)).
228+
rabbit_misc:get_env(rabbit, worker_shutdown_timeout, 300000)).
229229
-define(MSG_STORE_WORKER_WAIT,
230230
rabbit_misc:get_env(rabbit, msg_store_shutdown_timeout, 600000)).
231+
-define(CLASSIC_QUEUE_WORKER_WAIT,
232+
rabbit_misc:get_env(rabbit, classic_queue_shutdown_timeout, 600000)).
231233

232234
-define(HIBERNATE_AFTER_MIN, 1000).
233235
-define(DESIRED_HIBERNATE, 10000).

0 commit comments

Comments
 (0)