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:
Michiel Berger 2026-04-30 17:39:13 +02:00
parent c9dd23f078
commit b0933c444b

View file

@ -24,5 +24,7 @@ EXPOSE 8080
CMD ["gunicorn", "pluginbattery.web:app", \
"--bind", "0.0.0.0:8080", \
"--workers", "1", \
"--workers", "2", \
"--threads", "4", \
"--worker-class", "gthread", \
"--timeout", "120"]