EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 11502248 authored by Bernhard Mallinger's avatar Bernhard Mallinger
Browse files

Merge branch 'configurable-worker-timeout' into 'main'

Make worker timeout configurable using WORKER_TIMEOUT

See merge request !10
parents 9851d24c f8f721c9
No related branches found
No related tags found
1 merge request!10Make worker timeout configurable using WORKER_TIMEOUT
Pipeline #21169 passed
......@@ -4,12 +4,10 @@ import os
chdir = f'{os.environ["INSTALL_DIR"]}/pvs_instance/'
bind = ':80'
# workers
workers = 8
# workers (see also ./run-httpd.sh for dynamic configs)
max_requests = 10
max_requests_jitter = 3
worker_class = 'sync'
timeout = 120
# logging
accesslog = '-'
......
......@@ -2,6 +2,8 @@
DEBUG=${DEBUG:="false"}
WORKERS=${WORKERS:=8}
WORKER_TIMEOUT=${WORKER_TIMEOUT:=120}
if [[ "$DEBUG" = true ]] ; then
......@@ -9,5 +11,10 @@ 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}" \
--workers "${$WORKERS}" \
2>&1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment