Use gevent workers in gunicorn to fix SSE blocking
All checks were successful
Build and push Docker image / build (push) Successful in 31s
Test / test (push) Successful in 15s

SSE connections for radio streams were blocking sync gunicorn workers,
leaving the app unresponsive. Switching to gevent with 4 workers and
a higher timeout fixes concurrent SSE + normal request handling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marwin 2026-03-19 19:15:01 +01:00
parent 2bd83f6315
commit 391d733c1b
2 changed files with 2 additions and 1 deletions

View file

@ -15,4 +15,4 @@ RUN python manage.py collectstatic --noinput && mkdir -p /app/data
EXPOSE 8000
CMD ["sh", "-c", "python manage.py migrate --noinput && gunicorn diora.wsgi:application --bind 0.0.0.0:8000 --workers 2"]
CMD ["sh", "-c", "python manage.py migrate --noinput && gunicorn diora.wsgi:application --bind 0.0.0.0:8000 --workers 4 --worker-class gevent --timeout 120"]

View file

@ -4,3 +4,4 @@ requests>=2.31
python-dotenv>=1.0
whitenoise>=6.6
feedparser>=6.0
gevent>=24.0