配置文件
bind = ‘0.0.0.0:80’
workers = 8
threads = 64
loglevel = ‘debug’
timeout=120
backlog = 1024
worker_class = ‘gevent’
daemon = True
proc_name = ‘xxx’
pidfile = ‘./xx.pid’
accesslog = ‘./log/all.log’
errorlog = ‘./log/error.log’
用上面的的方式启动的时候总是提示worker超时,即使在没有负载的情况下也是这样,使用的是虚拟机。
将worker_class换成默认的sync后就好了
关于worker_class的设置
worker_class
-k STRING, --worker-class STRING
sync
The type of workers to use.
The default class (sync) should handle most “normal” types of workloads. You’ll want to read Design for information on when you might want to choose one of the other worker classes. Required libraries may be installed using setuptools’ extras_require feature.
A string referring to one of the following bundled classes:
sync
eventlet - Requires eventlet >= 0.24.1 (or install it