From d1d5cee96f914c41ccb0a4d1bd3a48b7d6f46e9b Mon Sep 17 00:00:00 2001 From: Dmitry Belan Date: Sat, 19 Sep 2026 15:13:36 +0300 Subject: [PATCH] chore: add gunicorn workers and threads to prevent worker lockup --- Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9ff83d..ef3f130 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,4 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /app/ EXPOSE 8111 -CMD ["gunicorn", "--bind", "0.0.0.0:8111", "--chdir", "/app/lmsege", "lmsege.wsgi:application"] +CMD ["gunicorn", "--bind", "0.0.0.0:8111", "--workers", "3", "--threads", "2", "--chdir", "/app/lmsege", "lmsege.wsgi:application"] diff --git a/docker-compose.yml b/docker-compose.yml index 17ed472..6d0edd7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: python manage.py makemigrations users lms && python manage.py migrate && python manage.py collectstatic --noinput && - gunicorn --bind 0.0.0.0:8111 lmsege.wsgi:application" + gunicorn --bind 0.0.0.0:8111 --workers 3 --threads 2 lmsege.wsgi:application" volumes: - .:/app - db-data:/app/lmsege/db_data