Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit a00687f

Browse files
committed
Enable Gunicorn max_requests config through env
This commit enables a user to alter the `max_requests` parameter passed through to Gunicorn without having to resort to the "bare" CMD-specification hinted at in the Advanced documentation.
1 parent c83efad commit a00687f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/gunicorn_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
graceful_timeout = int(os.environ.get('GUNICORN_GRACEFUL_TIMEOUT', 3600))
1313
timeout = int(os.environ.get('GUNICORN_SILENT_TIMEOUT', 3600))
1414
worker_class = 'gevent'
15-
max_requests = 100
15+
max_requests = int(os.environ.get('GUNICORN_MAX_REQUESTS', 100))
1616
workers = int(os.environ.get('GUNICORN_WORKERS', 4))
1717
log_level = 'debug'
1818
debug = True

0 commit comments

Comments
 (0)