From 1cffeb23a6116be1e6804834815379e22e359ba3 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Wed, 14 Apr 2021 14:38:23 +0200 Subject: [PATCH] Dockerfile entrypoint now sets 600s for gunicorn workers. --- HISTORY.rst | 1 + docker/docker-entrypoint.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 9ee426683..5b651d28f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,7 @@ End-User Summary Full Change List ================ +- Dockerfile entrypoint script uses timeout of 600s now for guniorn workers. - Fixing issue of database query in Clinvar Export feature where too large queries were created and postgres ran out of stack memory. - Adding more Sentry integrations (redis, celery, sqlalchemy). - Fixing search feature. diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index a2d6e40d2..00932b278 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -28,6 +28,8 @@ set -euo pipefail # default: 8080 # LOG_LEVEL -- logging verbosity # default: info +# GUNICORN_TIMEOUT -- timeout for gunicorn workers in seconds +# default: 600 APP_DIR=${APP_DIR-/usr/src/app} CELERY_QUEUES=${CELERY_QUEUES-default,query,import} @@ -38,6 +40,7 @@ export PYTHONUNBUFFERED=${PYTHONUNBUFFERED-1} HTTP_HOST=${HTTP_HOST-0.0.0.0} HTTP_PORT=${HTTP_PORT-8080} LOG_LEVEL=${LOG_LEVEL-info} +GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT-600} if [[ "$NO_WAIT" -ne 1 ]]; then /usr/local/bin/wait @@ -58,7 +61,12 @@ if [[ "$1" == wsgi ]]; then python manage.py migrate >&2 echo "VARFISH MIGRATIONS END" - exec gunicorn --access-logfile - --log-level "$LOG_LEVEL" --bind "$HTTP_HOST:$HTTP_PORT" config.wsgi + exec gunicorn \ + --access-logfile - \ + --log-level "$LOG_LEVEL" \ + --bind "$HTTP_HOST:$HTTP_PORT" \ + --timeout "$GUNICORN_TIMEOUT" \ + config.wsgi elif [[ "$1" == celeryd ]]; then cd $APP_DIR