File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363# multi-minute app import (which happens in the worker, post-fork, because
6464# --preload is NOT set). --timeout 0 is required: a worker mid-import does
6565# not heartbeat, and the default 30s watchdog would kill it before boot.
66+ # --max-requests recycles workers to bound the slow memory growth seen in
67+ # the Stage 2 30-minute soak (69% of 16Gi at --concurrency 4; OOM SIGKILL
68+ # at 8); jitter staggers recycling — a recycled worker re-imports for ~3
69+ # minutes, halving instance capacity while it does.
6670gunicorn policyengine_api.asgi:app \
6771 --worker-class uvicorn.workers.UvicornWorker \
6872 --workers " $WEB_CONCURRENCY " \
6973 --bind " 0.0.0.0:${PORT} " \
7074 --timeout 0 \
7175 --keep-alive 5 \
76+ --max-requests 500 \
77+ --max-requests-jitter 100 \
7278 --forwarded-allow-ips ' *' &
7379server_pid=" $! "
7480
You can’t perform that action at this time.
0 commit comments