From: Fernando Gutierrez Date: Tue, 12 May 2020 02:25:10 +0000 (+1000) Subject: Avoid Celery/RabbitMQ "connection reset" errors [#5609]. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=243354b65e1c2793f12d01d8174e9a168eb01ecd;p=mediagoblin.git Avoid Celery/RabbitMQ "connection reset" errors [#5609]. This change starts Celery only after RabbitMQ is available. It also returns the unnecessarily low BROKER_HEARTBEAT setting to default of 120.0 to help prevent connections being reset on machines under load. --- diff --git a/AUTHORS b/AUTHORS index 00838c47..632e8f4e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -45,6 +45,7 @@ Thank you! * Duncan Paterson * Elrond of Samba TNG * Emily O'Leary +* Fernando Gutierrez * Gabi Thume * Gabriel Saldana * Greg Grossmeier diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst index 41e67c31..e3780325 100644 --- a/docs/source/siteadmin/deploying.rst +++ b/docs/source/siteadmin/deploying.rst @@ -528,6 +528,7 @@ environment's setup: # Set the WorkingDirectory and Environment values to match your environment. [Unit] Description=MediaGoblin Celeryd + After=rabbitmq-server.service [Service] User=mediagoblin diff --git a/mediagoblin/init/celery/__init__.py b/mediagoblin/init/celery/__init__.py index 9a67942c..9fb783bd 100644 --- a/mediagoblin/init/celery/__init__.py +++ b/mediagoblin/init/celery/__init__.py @@ -81,7 +81,6 @@ def get_celery_settings_dict(app_config, global_config, 'schedule': datetime.timedelta(minutes=frequency), } } - celery_settings['BROKER_HEARTBEAT'] = 1 return celery_settings