Skip to content

Commit

Permalink
✨([dogwood|eucalyptus/3/*]) make gunicorn timeout configurable
Browse files Browse the repository at this point in the history
As some synchronous requests may be quite long (e.g. courses
importation), we should make timeout rather high and configurable so
that it could be increased without having to make a new release of this
image
  • Loading branch information
jmaupetit committed Dec 26, 2019
1 parent 72055de commit 2dee6ea
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 4 deletions.
4 changes: 4 additions & 0 deletions releases/dogwood/3/bare/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ release.

## [Unreleased]

### Added

- Make Gunicorn timeout configurable via an environment variable

## [dogwood.3-1.1.5] - 2019-12-24

### Fixed
Expand Down
14 changes: 13 additions & 1 deletion releases/dogwood/3/bare/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ USER 10000
# (defaults to "lms")
ENV SERVICE_VARIANT=lms

# Gunicorn configuration
#
# As some synchronous requests may be quite long (e.g. courses import), we
# should make timeout rather high and configurable so that it could be
# increased without having to make a new release of this image
ENV GUNICORN_TIMEOUT 300

# Use Gunicorn in production as web server
CMD DJANGO_SETTINGS_MODULE=${SERVICE_VARIANT}.envs.fun.docker_run \
gunicorn --name=${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
gunicorn \
--name=${SERVICE_VARIANT} \
--bind=0.0.0.0:8000 \
--max-requests=1000 \
--timeout=${GUNICORN_TIMEOUT} \
${SERVICE_VARIANT}.wsgi:application
4 changes: 4 additions & 0 deletions releases/dogwood/3/fun/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ release.

## [Unreleased]

### Added

- Make Gunicorn timeout configurable via an environment variable

### Fixed

- Move LTI xblock configurations from fun settings to production
Expand Down
15 changes: 14 additions & 1 deletion releases/dogwood/3/fun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,19 @@ USER 10000
# (defaults to "lms")
ENV SERVICE_VARIANT=lms

# Gunicorn configuration
#
# As some synchronous requests may be quite long (e.g. courses import), we
# should make timeout rather high and configurable so that it could be
# increased without having to make a new release of this image
#
ENV GUNICORN_TIMEOUT 300

# Use Gunicorn in production as web server
CMD DJANGO_SETTINGS_MODULE=${SERVICE_VARIANT}.envs.fun.docker_run \
gunicorn --name=${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
gunicorn \
--name=${SERVICE_VARIANT} \
--bind=0.0.0.0:8000 \
--max-requests=1000 \
--timeout=${GUNICORN_TIMEOUT} \
${SERVICE_VARIANT}.wsgi:application
4 changes: 4 additions & 0 deletions releases/eucalyptus/3/bare/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ release.

## [Unreleased]

### Added

- Make Gunicorn timeout configurable via an environment variable

## [eucalyptus.3-1.0.4] - 2019-12-24

### Fixed
Expand Down
14 changes: 13 additions & 1 deletion releases/eucalyptus/3/bare/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ USER 10000
# (defaults to "lms")
ENV SERVICE_VARIANT=lms

# Gunicorn configuration
#
# As some synchronous requests may be quite long (e.g. courses import), we
# should make timeout rather high and configurable so that it could be
# increased without having to make a new release of this image
ENV GUNICORN_TIMEOUT 300

# Use Gunicorn in production as web server
CMD DJANGO_SETTINGS_MODULE=${SERVICE_VARIANT}.envs.fun.docker_run \
gunicorn --name=${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
gunicorn \
--name=${SERVICE_VARIANT} \
--bind=0.0.0.0:8000 \
--max-requests=1000 \
--timeout=${GUNICORN_TIMEOUT} \
${SERVICE_VARIANT}.wsgi:application
4 changes: 4 additions & 0 deletions releases/eucalyptus/3/wb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ release.

## [Unreleased]

### Added

- Make Gunicorn timeout configurable via an environment variable

## [eucalyptus.3-wb-1.2.2] - 2019-12-26

### Fixed
Expand Down
14 changes: 13 additions & 1 deletion releases/eucalyptus/3/wb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ USER 10000
# (defaults to "lms")
ENV SERVICE_VARIANT=lms

# Gunicorn configuration
#
# As some synchronous requests may be quite long (e.g. courses import), we
# should make timeout rather high and configurable so that it could be
# increased without having to make a new release of this image
ENV GUNICORN_TIMEOUT 300

# Use Gunicorn in production as web server
CMD DJANGO_SETTINGS_MODULE=${SERVICE_VARIANT}.envs.fun.docker_run \
gunicorn --name=${SERVICE_VARIANT} --bind=0.0.0.0:8000 --max-requests=1000 ${SERVICE_VARIANT}.wsgi:application
gunicorn \
--name=${SERVICE_VARIANT} \
--bind=0.0.0.0:8000 \
--max-requests=1000 \
--timeout=${GUNICORN_TIMEOUT} \
${SERVICE_VARIANT}.wsgi:application

0 comments on commit 2dee6ea

Please sign in to comment.