Files
drl_2/xuexiao/gunicorn_config.py
user9994793890 ee860ce0ae Initial commit
2026-05-29 10:28:07 +08:00

25 lines
518 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import multiprocessing
# 绑定地址和端口
bind = "0.0.0.0:8000"
# 工作进程数Python 3.11 性能更好CPU核数*2即可
workers = multiprocessing.cpu_count() * 2
# 使用异步 worker 提升性能
worker_class = "gevent"
# 超时时间
timeout = 120
keepalive = 5
# 日志配置
accesslog = "/app/logs/gunicorn_access.log"
errorlog = "/app/logs/gunicorn_error.log"
loglevel = "info"
# 进程名称
proc_name = "flask_app"
# 生产环境关闭自动重载c
reload = False