From 2bc93e8fe15032cd06ccb16db01d6a03ec726198 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Tue, 24 Oct 2023 18:06:43 +0800 Subject: [PATCH] fix: adjust gunicorn.conf.py --- gunicorn.conf.py | 12 ++++++------ requirements.txt | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gunicorn.conf.py b/gunicorn.conf.py index d936684..39560ce 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -1,16 +1,16 @@ import multiprocessing -from gevent import monkey - -monkey.patch_all() - +# from gevent import monkey +# monkey.patch_all() +preload_app = True bind = "0.0.0.0:5000" -worker_class = 'gevent' +# worker_class = 'gevent' +worker_class = 'egg:meinheld#gunicorn_worker' # 设置最大并发量 daemon = False debug = False -worker_connections = 3000 +worker_connections = 2000 workers = multiprocessing.cpu_count() * 2 + 1 # 指定每个工作者的线程数 diff --git a/requirements.txt b/requirements.txt index cd6923f..359bef4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ git+https://gitea.bearcatlog.com/BryantStudio/chassis.git@main#egg=chassis[apiflask,nameko] -psutil \ No newline at end of file +psutil +meinheld==1.0.2 \ No newline at end of file