diff --git a/docker-compose.yml b/docker-compose.yml index 141abd7f8..209a7f317 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,10 @@ services: - DOCUMENTSTORE_PARAMS_HOST=elasticsearch - PIPELINE_YAML_PATH=/opt/pipelines/pipelines.haystack-pipeline.yml - TOKENIZERS_PARALLELISM=false + # Uncomment the following line to customise how much time (in seconds) a worker can spend serving a request + # before it times out. This should include the time required to cache the models and setup the pipelines. + + # - GUNICORN_CMD_ARGS="--timeout=3000" depends_on: elasticsearch: condition: service_healthy diff --git a/docker/Dockerfile.api b/docker/Dockerfile.api index 31b85b459..1b6a3f9a8 100644 --- a/docker/Dockerfile.api +++ b/docker/Dockerfile.api @@ -22,4 +22,4 @@ ENV TIKA_LOG_PATH="/var/log/$SERVICE_NAME/" EXPOSE 8000 USER $SERVICE_NAME -CMD ["gunicorn", "rest_api.application:app", "-b", "0.0.0.0", "-k", "uvicorn.workers.UvicornWorker", "--workers", "1", "--timeout", "180"] +CMD ["gunicorn", "rest_api.application:app", "-b", "0.0.0.0", "-k", "uvicorn.workers.UvicornWorker", "--workers", "1", "--timeout", "1000"]