| 1234567891011121314151617181920 | import osfrom multiprocessing import cpu_count# 日志配置# 本地日志存储路径log_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logs")if not os.path.exists(log_path):    os.makedirs(log_path)loglevel = "info"accesslog = os.path.join(log_path, 'access.log')errorlog = os.path.join(log_path, 'error.log')# workers = 5workers = 2 * cpu_count() + 1# 线程数 20240223 单线程改为多线程 解决服务挂掉问题 无效# threads = cpu_count()# 设置工作模式为协程worker_class = "gevent"bind = "0.0.0.0:5001"# 超时时间 默认30s 20240223 增加超时时间 解决服务挂掉问题timeout = 120
 |