Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions gunicorn_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from notifications_utils.gunicorn_defaults import set_gunicorn_defaults
from notifications_utils.gunicorn.defaults import set_gunicorn_defaults

set_gunicorn_defaults(globals())

Expand All @@ -16,10 +16,12 @@ def child_exit(server, worker):


workers = 4
worker_class = "eventlet"
worker_connections = 8 # limit runaway greenthread creation
worker_class = "notifications_utils.gunicorn.eventlet.NotifyEventletWorker"
#worker_connections = 8 # limit runaway greenthread creation
worker_connections = 256 # re-enabling the problem
statsd_host = "{}:8125".format(os.getenv("STATSD_HOST"))
keepalive = 0 # disable temporarily for diagnosing issues
keepalive = 35 # re-enabling the problem
#keepalive = 0 # disable temporarily for diagnosing issues
timeout = int(os.getenv("HTTP_SERVE_TIMEOUT_SECONDS", 30)) # though has little effect with eventlet worker_class

debug_post_threshold = os.getenv("NOTIFY_GUNICORN_DEBUG_POST_REQUEST_LOG_THRESHOLD_SECONDS", None)
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ psutil>=6.0.0,<7.0.0
notifications-python-client==10.0.1

# Run `make bump-utils` to update to the latest version
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@94.0.1
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@2d56aef11c9d34acf15176a1b2b20cc874b4deec

# gds-metrics requires prometheseus 0.2.0, override that requirement as 0.7.1 brings significant performance gains
prometheus-client==0.14.1
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ gds-metrics @ git+https://github.com/alphagov/gds_metrics_python.git@6f1840a57b6
govuk-bank-holidays==0.15
# via notifications-utils
greenlet==3.0.3
# via eventlet
# via
# eventlet
# sqlalchemy
gunicorn @ git+https://github.com/benoitc/gunicorn.git@1299ea9e967a61ae2edebe191082fd169b864c64
# via
# -r requirements.in
Expand Down Expand Up @@ -147,7 +149,7 @@ mistune==0.8.4
# via notifications-utils
notifications-python-client==10.0.1
# via -r requirements.in
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@d6311c3ab83b8225265277f781157c48f9318ae9
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@2d56aef11c9d34acf15176a1b2b20cc874b4deec
# via -r requirements.in
ordered-set==4.1.0
# via notifications-utils
Expand Down
3 changes: 2 additions & 1 deletion requirements_for_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ greenlet==3.0.3
# via
# -r requirements.txt
# eventlet
# sqlalchemy
gunicorn @ git+https://github.com/benoitc/gunicorn.git@1299ea9e967a61ae2edebe191082fd169b864c64
# via
# -r requirements.txt
Expand Down Expand Up @@ -219,7 +220,7 @@ moto==5.0.11
# via -r requirements_for_test.in
notifications-python-client==10.0.1
# via -r requirements.txt
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@d6311c3ab83b8225265277f781157c48f9318ae9
notifications-utils @ git+https://github.com/alphagov/notifications-utils.git@2d56aef11c9d34acf15176a1b2b20cc874b4deec
# via -r requirements.txt
ordered-set==4.1.0
# via
Expand Down