Created
May 28, 2019 09:36
-
-
Save pavank/e6440de17d3c24c07faae0fab0640e0d to your computer and use it in GitHub Desktop.
Gunicorn Config
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
"""gunicorn WSGI server configuration.""" | |
from multiprocessing import cpu_count | |
from os import environ | |
def max_workers(): | |
return cpu_count() * 2 + 1 | |
# Config Properties | |
bind = '0.0.0.0:' + environ.get('PORT', '8080') | |
max_requests = 1000 | |
worker_class = 'aiohttp.GunicornWebWorker' | |
workers = 1 # commet this line for prod | |
# workers = max_workers() #uncomment this line for prod | |
accesslog = '-' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment