diff --git a/docker-compose.yml b/docker-compose.yml index 326966a5..ec2628a8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,10 +79,19 @@ services: - gunicorn - --bind - 0.0.0.0:5001 + # Threaded workers so one blocked request (e.g. an agent that fails the TLS + # handshake and retries in a loop) cannot pin a whole worker and starve the + # UI. With sync workers a handful of stuck clients exhausted all capacity. + - --worker-class + - gthread - --workers - "4" + - --threads + - "8" + # Shorter timeout so a hung connection frees its thread quickly instead of + # holding it for a full minute. - --timeout - - "60" + - "30" - --access-logfile - "-" - --error-logfile