From 782881aa368b9be3764504db980bdf072cb24f74 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger <bernhard.mallinger@eox.at> Date: Tue, 1 Feb 2022 15:57:45 +0100 Subject: [PATCH] Make worker timeout configurable using WORKER_TIMEOUT This is necessary because downloads can take way longer than 120 sec --- gunicorn.conf.py | 1 - run-httpd.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 8a5a9a9..ea417af 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -9,7 +9,6 @@ workers = 8 max_requests = 10 max_requests_jitter = 3 worker_class = 'sync' -timeout = 120 # logging accesslog = '-' diff --git a/run-httpd.sh b/run-httpd.sh index 851eacc..648650b 100755 --- a/run-httpd.sh +++ b/run-httpd.sh @@ -2,6 +2,7 @@ DEBUG=${DEBUG:="false"} +WORKER_TIMEOUT=${WORKER_TIMEOUT:=120} if [[ "$DEBUG" = true ]] ; then @@ -9,5 +10,5 @@ if [[ "$DEBUG" = true ]] ; then python3 /var/www/pvs/dev/pvs_instance/manage.py runserver 0.0.0.0:80 else echo "Running gunicorn" - exec gunicorn --config /opt/core/gunicorn.conf.py pvs_instance.wsgi:application 2>&1 + exec gunicorn --config /opt/core/gunicorn.conf.py pvs_instance.wsgi:application --timeout "${WORKER_TIMEOUT}" 2>&1 fi -- GitLab