Threaded gunicorn workers so a retry storm cannot starve the UI
This commit is contained in:
@@ -139,10 +139,16 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
-H "Content-Type: application/json" -d '{}' \
|
||||
| grep -q "VALIDATION_ERROR" || exit 1
|
||||
|
||||
# Threaded workers, matching docker-compose.yml - see the reasoning there. A
|
||||
# compose file overrides this CMD, but an image run without one (a plain
|
||||
# `docker run`, a site's own orchestrator) would otherwise still get the
|
||||
# blocking sync default and the same starvation.
|
||||
CMD ["gunicorn", \
|
||||
"--bind", "0.0.0.0:5001", \
|
||||
"--worker-class", "gthread", \
|
||||
"--workers", "4", \
|
||||
"--timeout", "60", \
|
||||
"--threads", "8", \
|
||||
"--timeout", "30", \
|
||||
"--access-logfile", "-", \
|
||||
"--error-logfile", "-", \
|
||||
"wsgi:app"]
|
||||
|
||||
Reference in New Issue
Block a user