diff --git a/Dockerfile b/Dockerfile index f25b16e..dc73438 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,9 +35,11 @@ ENV UPLOAD_PATH=/app/data/files EXPOSE 5000 -# gthread worker class so SSE long-poll connections don't starve regular requests. -# 2 workers x 16 threads = 32 concurrent slots; each SSE client just holds one thread. +# Single worker with many threads. The SSE broadcaster lives in process +# memory - mit mehreren Workern wuerden Events den Empfaenger nicht +# erreichen wenn Sender und Empfaenger auf verschiedenen Workern haengen. +# 32 Threads = bis zu 32 gleichzeitige Requests/SSE-Streams. CMD ["gunicorn", "--bind", "0.0.0.0:5000", \ - "--worker-class", "gthread", "--workers", "2", "--threads", "16", \ + "--worker-class", "gthread", "--workers", "1", "--threads", "32", \ "--timeout", "120", "--keep-alive", "65", \ "wsgi:application"]