From 5ce1e7ec37207013a7733b9df943977a15e421e5 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Wed, 22 Nov 2023 08:36:10 +0100 Subject: [PATCH] Docker: Disable the consumer timeout for RabbitMQ (#6189) As of RabbitMQ v3.8.15, a default `consumer_timeout` is set of 30 minutes. If a task is not acknowledged within this timelimit, the consumer of the task is considered dead and its tasks are rescheduled. This is problematic for AiiDA since tasks often take multiple hours even. The `consumer_timeout` can only be changed on through the server config. Here we disable it through the `advanced.config`. Cherry-pick: 33dffb0eecaaca147b7e3aae972aa36d7b90241b --- .../s6-assets/init/rabbitmq-init.sh | 11 ++++++++-- .docker/tests/conftest.py | 20 +++++++++++++++---- .docker/tests/test_aiida.py | 15 +++++++++----- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.docker/aiida-core-with-services/s6-assets/init/rabbitmq-init.sh b/.docker/aiida-core-with-services/s6-assets/init/rabbitmq-init.sh index f4c6a0766f..ced09bd059 100755 --- a/.docker/aiida-core-with-services/s6-assets/init/rabbitmq-init.sh +++ b/.docker/aiida-core-with-services/s6-assets/init/rabbitmq-init.sh @@ -14,8 +14,15 @@ echo MNESIA_BASE="${RABBITMQ_DATA_DIR}" >> "${RMQ_ETC_DIR}/rabbitmq-env.conf" echo LOG_BASE="${RABBITMQ_DATA_DIR}/log" >> "${RMQ_ETC_DIR}/rabbitmq-env.conf" # using workaround from https://github.com/aiidateam/aiida-core/wiki/RabbitMQ-version-to-use -# set timeout to 100 hours -echo "consumer_timeout=3600000" >> "${RMQ_ETC_DIR}/rabbitmq.conf" +# setting the consumer_timeout to undefined disables the timeout +cat > "${RMQ_ETC_DIR}/advanced.config" <