Skip to content

Commit d5cfbcd

Browse files
committed
Increase worker_connections to 256 and enable keep alive
1 parent 56072e4 commit d5cfbcd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gunicorn_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def child_exit(server, worker):
1717

1818
workers = 4
1919
worker_class = "eventlet"
20-
worker_connections = 8 # limit runaway greenthread creation
20+
worker_connections = 256
2121
statsd_host = "{}:8125".format(os.getenv("STATSD_HOST"))
22-
keepalive = 0 # disable temporarily for diagnosing issues
22+
keepalive = 90
2323
timeout = int(os.getenv("HTTP_SERVE_TIMEOUT_SECONDS", 30)) # though has little effect with eventlet worker_class
2424

2525
debug_post_threshold = os.getenv("NOTIFY_GUNICORN_DEBUG_POST_REQUEST_LOG_THRESHOLD_SECONDS", None)

tests/test_gunicorn_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
def test_gunicorn_config():
55
assert workers == 4
66
assert worker_class == "eventlet"
7-
assert keepalive == 0
7+
assert keepalive == 90
88
assert timeout == 30

0 commit comments

Comments
 (0)