Dockerfile: gunicorn 2 workers x 4 threads (gthread)
Single sync worker means a slow request to / (compute_leaderboard, ~17s on dev / longer on h4a's compact CPU slice) blocks every other request, including the /healthz probe. With 2 worker processes and 4 threads each, slow requests on / no longer wedge the gunicorn queue, and /healthz responds promptly even while a /api/calculate is in flight.
This commit is contained in:
parent
c9dd23f078
commit
b0933c444b
1 changed files with 3 additions and 1 deletions
|
|
@ -24,5 +24,7 @@ EXPOSE 8080
|
||||||
|
|
||||||
CMD ["gunicorn", "pluginbattery.web:app", \
|
CMD ["gunicorn", "pluginbattery.web:app", \
|
||||||
"--bind", "0.0.0.0:8080", \
|
"--bind", "0.0.0.0:8080", \
|
||||||
"--workers", "1", \
|
"--workers", "2", \
|
||||||
|
"--threads", "4", \
|
||||||
|
"--worker-class", "gthread", \
|
||||||
"--timeout", "120"]
|
"--timeout", "120"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue