diff --git a/boot.sh b/boot.sh index 5116c3c7a..f07943b67 100755 --- a/boot.sh +++ b/boot.sh @@ -104,5 +104,5 @@ chmod -R 755 ${MEDIA_ROOT:-/opt/recipes/mediafiles} ipv6_disable=$(cat /sys/module/ipv6/parameters/disable) echo "Starting gunicorn" -exec gunicorn --bind unix:/run/tandoor.sock --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi +exec gunicorn --bind unix:/run/tandoor.sock --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --timeout ${GUNICORN_TIMEOUT:-30} --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi diff --git a/docs/system/configuration.md b/docs/system/configuration.md index 91a3d4bb0..e0bbead44 100644 --- a/docs/system/configuration.md +++ b/docs/system/configuration.md @@ -189,6 +189,19 @@ See [Gunicorn docs](https://docs.gunicorn.org/en/stable/design.html#how-many-wor GUNICORN_THREADS=2 ``` + +#### Gunicorn Timeout + +> default `30` - options `1-X` + +Set the timeout in seconds of gunicorn when starting using `boot.sh` (all container installations). +The default is likely appropriate for most installations. However, if you are using a LLM which high response times gunicornmight time out during the wait until the LLM finished, in such cases you might want to increase the timeout. +See [Gunicorn docs]([https://docs.gunicorn.org/en/stable/design.html#how-many-workers](https://docs.gunicorn.org/en/stable/settings.html#timeout)) for default settings. + +``` +GUNICORN_TIMEOUT=30 +``` + #### Gunicorn Media > default `0` - options `0`, `1`