Skip to content

Commit

Permalink
Dockerfile entrypoint now sets 600s for gunicorn workers.
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Apr 14, 2021
1 parent 784a6bb commit 1cffeb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.rst
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion docker/docker-entrypoint.sh
Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 1cffeb2

Please sign in to comment.