diff --git a/charts/deckhand/templates/deployment.yaml b/charts/deckhand/templates/deployment.yaml index 64276285..ddfa972a 100644 --- a/charts/deckhand/templates/deployment.yaml +++ b/charts/deckhand/templates/deployment.yaml @@ -45,6 +45,8 @@ spec: containers: - name: deckhand env: + - name: 'DECKHAND_API_TIMEOUT' + value: {{ .Values.conf.uwsgi.timeout | default 600 | quote }} - name: 'DECKHAND_API_WORKERS' value: {{ .Values.conf.uwsgi.workers | default 4 | quote }} - name: 'DECKHAND_API_THREADS' diff --git a/entrypoint.sh b/entrypoint.sh index 21b9ae7f..debce75e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,6 +18,8 @@ set -ex # Define port PORT=${PORT:-9000} +# How long uWSGI should wait for each deckhand response +DECKHAND_API_TIMEOUT=${DECKHAND_API_TIMEOUT:-"600"} # Number of uWSGI workers to handle API requests DECKHAND_API_WORKERS=${DECKHAND_API_WORKERS:-"4"} # Threads per worker @@ -28,6 +30,7 @@ exec uwsgi \ --http :${PORT} \ -w deckhand.cmd \ --callable deckhand_callable \ + --http-timeout $DECKHAND_API_TIMEOUT \ --enable-threads \ -L \ --pyargv "--config-file /etc/deckhand/deckhand.conf" \