2023-08-10 12:27:18 +08:00
|
|
|
import multiprocessing
|
|
|
|
|
|
|
|
from gevent import monkey
|
|
|
|
|
|
|
|
monkey.patch_all()
|
|
|
|
|
|
|
|
|
|
|
|
bind = "0.0.0.0:5000"
|
|
|
|
worker_class = 'gevent'
|
|
|
|
# 设置最大并发量
|
|
|
|
daemon = False
|
|
|
|
debug = False
|
2023-10-24 17:46:51 +08:00
|
|
|
worker_connections = 3000
|
2023-08-10 12:27:18 +08:00
|
|
|
workers = multiprocessing.cpu_count() * 2 + 1
|
2023-10-24 17:30:14 +08:00
|
|
|
|
2023-08-10 12:27:18 +08:00
|
|
|
# 指定每个工作者的线程数
|
2023-10-24 17:30:14 +08:00
|
|
|
# threads = 10
|
2023-08-10 12:27:18 +08:00
|
|
|
|
|
|
|
# pidfile = "/var/run/gunicorn.pid"
|
|
|
|
# accesslog = '/var/log/gunicorn_access.log'
|
|
|
|
# errorlog = '/var/log/gunicorn_error.log'
|
|
|
|
# 设置日志记录水平
|
|
|
|
loglevel = 'warning'
|