diff options
| author | kj_sh604 | 2026-03-11 23:44:08 -0400 |
|---|---|---|
| committer | kj_sh604 | 2026-03-11 23:44:08 -0400 |
| commit | ca95b6bf2ae7bce20bb6a2d91651c86fd27c596a (patch) | |
| tree | c4fb6d2e06e7f903c0b4eb4539f0aa2f5ea8dfbe | |
| parent | 3ec602df2defbe06e1faf6202e2529e890ad4348 (diff) | |
refactor: more vps deployment -friendly settings
| -rw-r--r-- | Dockerfile | 2 | ||||
| -rw-r--r-- | README.md | 10 |
2 files changed, 8 insertions, 4 deletions
@@ -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"] @@ -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 |
