-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gunicorn setup for readability
- Loading branch information
1 parent
a888b9a
commit 2a4734c
Showing
3 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
import os | ||
|
||
# Refer to gunicorn settings below for more info on each one | ||
# https://docs.gunicorn.org/en/stable/settings.html | ||
timeout = 300 | ||
# increasing workers uses more RAM, but provides a simple model for scaling up resources | ||
workers = os.getenv("GUNICORN_WORKERS", default=8) | ||
# increasing threads saves RAM at the cost of using more CPU | ||
threads = os.getenv("GUNICORN_THREADS", default=1) | ||
|
||
# Log HTTP requests, so we can compare them with our reverse proxy | ||
accesslog = "-" | ||
# use the default log format, but add the time taken by each request in milliseconds as well %(M)s | ||
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s %(M)s "%(f)s" "%(a)s"' | ||
|
||
# set gunicorn log level to info, not warning. | ||
loglevel = "info" | ||
# capture the output from django, to pipe to the gunicorn errlog | ||
capture_output = True |
This file was deleted.
Oops, something went wrong.