From ca95b6bf2ae7bce20bb6a2d91651c86fd27c596a Mon Sep 17 00:00:00 2001 From: kj_sh604 Date: Wed, 11 Mar 2026 23:44:08 -0400 Subject: refactor: more vps deployment -friendly settings --- Dockerfile | 2 +- README.md | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ff9c84..2ef5ac8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,4 +34,4 @@ USER app EXPOSE 5001 -CMD ["gunicorn", "--bind", "0.0.0.0:5001", "--workers", "2", "--threads", "4", "--timeout", "180", "--graceful-timeout", "30", "--access-logfile", "-", "--error-logfile", "-", "app:app"] +CMD ["gunicorn", "--bind", "0.0.0.0:5001", "--worker-class", "gthread", "--workers", "1", "--threads", "2", "--timeout", "240", "--graceful-timeout", "30", "--keep-alive", "5", "--max-requests", "300", "--max-requests-jitter", "50", "--access-logfile", "-", "--error-logfile", "-", "app:app"] diff --git a/README.md b/README.md index 811daac..59023f0 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,14 @@ python3 app.py cd src/ ../.venv/bin/gunicorn \ --bind 127.0.0.1:5001 \ - --workers 2 \ - --threads 4 \ - --timeout 180 \ + --worker-class gthread \ + --workers 1 \ + --threads 2 \ + --timeout 240 \ --graceful-timeout 30 \ + --keep-alive 5 \ + --max-requests 300 \ + --max-requests-jitter 50 \ --access-logfile - \ --error-logfile - \ app:app -- cgit v1.2.3