From 02cc106af34dcf8a0da36e655b5730ff452f73bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 4 Nov 2020 18:19:35 +0100 Subject: [PATCH] Add some jitter to the openedx gunicorn workers This should prevent gunicorn workers from restarting all at the same time. --- CHANGELOG.md | 2 ++ tutor/templates/build/openedx/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ef50b..fdf2d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Improvement] In the openedx production docker image, add some jitter to the gunicorn worker restart process to prevent all workers from restarting at the same time. + ## v10.4.0 (2020-10-30) **Note for users of the [Tutor AMI](https://aws.amazon.com/marketplace/pp/B07PV3TB8X):** To upgrade from a previous v10 release, run: diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 5598fc1..02e05f2 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -203,4 +203,4 @@ ENTRYPOINT ["docker-entrypoint.sh"] # Run server COPY gunicorn_conf.py /openedx/gunicorn_conf.py EXPOSE 8000 -CMD gunicorn -c /openedx/gunicorn_conf.py --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 --access-logfile - ${SERVICE_VARIANT}.wsgi:application +CMD gunicorn -c /openedx/gunicorn_conf.py --name ${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 --max-requests-jitter=100 --access-logfile - ${SERVICE_VARIANT}.wsgi:application