gunicorn 配置文件

#coding=utf-8
import logging.handlers
import multiprocessing
import sys
import os

print(__file__)
utils_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),'utils')
print(utils_path)
sys.path.append(utils_path)

bind = '0.0.0.0:8000'  # 绑定ip和端口号
backlog = 512  # 监听队列
timeout = 30  # 超时
worker_class = 'eventlet'  # 使用gevent模式,还可以使用sync 模式,默认的是sync模式

workers = multiprocessing.cpu_count()  # 进程数
threads = 2  # 指定每个进程开启的线程数
# 日志处理
原文地址:https://www.cnblogs.com/pythonwl/p/14270889.html