配置详见:http://docs.gunicorn.org/en/latest/settings.html
./gunicorn.conf.py
#!/usr/bin/env python3
bind = '0.0.0.0:8000'
workers = 1
keepalive = 60
timeout = 600
max_requests = 30000
worker_class = 'tornado'
worker_class = 'meinheld.gmeinheld.MeinheldWorker'
worker_class = 'gevent'
worker_class = 'sync'
worker_class = 'uvicorn.workers.UvicornWorker'
accesslog = '-'
access_log_format = '%(t)s %(h)s "%(r)s" %(s)s %(b)s %(D)s "%(a)s"'
def on_starting(server):
print('on_starting', server)
def child_exit(server, worker):
print('child_exit', server, worker)