From 606e1822d180e0eb61ae0504d312af976b8e7b41 Mon Sep 17 00:00:00 2001 From: Aiirondev Date: Sat, 30 May 2026 13:09:09 +0200 Subject: [PATCH] fix: increase max-requests and max-requests-jitter for gunicorn in Dockerfile, docker-compose, and start.sh --- Dockerfile | 2 +- docker-compose-multitenant.yml | 2 +- start.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7b26ab..0bdb7e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,4 +32,4 @@ RUN if [ "$NUITKA_BUILD" = "1" ]; then \ WORKDIR /app/Web EXPOSE 8000 -CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "30", "--graceful-timeout", "20", "--max-requests", "200", "--max-requests-jitter", "50", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] +CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "30", "--graceful-timeout", "20", "--max-requests", "1000", "--max-requests-jitter", "100", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] diff --git a/docker-compose-multitenant.yml b/docker-compose-multitenant.yml index 18d2dd6..f211177 100644 --- a/docker-compose-multitenant.yml +++ b/docker-compose-multitenant.yml @@ -66,7 +66,7 @@ services: PYTHON_VERSION: "3.13" OPTIMIZATION_LEVEL: 2 working_dir: /app/Web - command: ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "30", "--graceful-timeout", "20", "--max-requests", "200", "--max-requests-jitter", "50", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] + command: ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "30", "--graceful-timeout", "20", "--max-requests", "1000", "--max-requests-jitter", "100", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] restart: unless-stopped security_opt: - no-new-privileges:true diff --git a/start.sh b/start.sh index afa1210..2f3b1b1 100755 --- a/start.sh +++ b/start.sh @@ -572,7 +572,7 @@ write_runtime_compose_override() { services: app: working_dir: /app/Web - command: ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "${INVENTAR_WORKERS:-2}", "--threads", "${INVENTAR_THREADS:-2}", "--timeout", "${INVENTAR_WORKER_TIMEOUT:-30}", "--graceful-timeout", "20", "--worker-connections", "${INVENTAR_WORKER_CONNECTIONS:-100}", "--max-requests", "200", "--max-requests-jitter", "50", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] + command: ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--workers", "${INVENTAR_WORKERS:-2}", "--threads", "${INVENTAR_THREADS:-2}", "--timeout", "${INVENTAR_WORKER_TIMEOUT:-30}", "--graceful-timeout", "20", "--worker-connections", "${INVENTAR_WORKER_CONNECTIONS:-100}", "--max-requests", "1000", "--max-requests-jitter", "100", "--log-level", "info", "--access-logfile", "-", "--error-logfile", "-"] image: ${APP_IMAGE_VALUE} build: null EOF