diff --git a/gunicorn_config.py b/gunicorn_config.py index 292cb4d..4a36f92 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -5,12 +5,12 @@ bind = '0.0.0.0:5000' # 工作进程与协程配置 #workers = multiprocessing.cpu_count() # 异步模式 Worker 数等于 CPU 核数 -workers=1 +workers=4 # worker_class = 'gevent' # 启用协程 worker_connections = 2000 # 适当增加单 Worker 并发量 # 超时与自动重启 -timeout = 120 +timeout = 1200 max_requests = 1000 max_requests_jitter = 50 @@ -20,6 +20,6 @@ accesslog = 'logs/gunicorn_access.log' errorlog = 'logs/gunicorn_error.log' # 生产环境安全配置 -reload = False -preload_app = True -forwarded_allow_ips = '*' # 根据实际代理 IP 调整 \ No newline at end of file +# reload = False +# preload_app = True +# forwarded_allow_ips = '*' # 根据实际代理 IP 调整 \ No newline at end of file