From 54c1cad67650c895d91c8b17d0d8f955dc1d30df Mon Sep 17 00:00:00 2001 From: H Vs Date: Mon, 10 Mar 2025 09:39:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gunicorn_config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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