From 6035241efb73c3c0e75105c429bd4cedd1527af7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 18 Jul 2023 10:44:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20gunicon=E6=B7=BB=E5=8A=A0=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/management/commands/services/services/gunicorn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/management/commands/services/services/gunicorn.py b/apps/common/management/commands/services/services/gunicorn.py index bd14284af..3ac6eedee 100644 --- a/apps/common/management/commands/services/services/gunicorn.py +++ b/apps/common/management/commands/services/services/gunicorn.py @@ -22,7 +22,8 @@ class GunicornService(BaseService): '-b', bind, '-k', 'uvicorn.workers.UvicornWorker', '-w', str(self.worker), - '--max-requests', '40960', + '--max-requests', '10240', + '--max-requests-jitter', '5120', '--access-logformat', log_format, '--access-logfile', '-' ] From d965ac0781752d1958b6f341140fe36275c4283f Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 18 Jul 2023 11:00:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/management/commands/services/services/gunicorn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/management/commands/services/services/gunicorn.py b/apps/common/management/commands/services/services/gunicorn.py index 3ac6eedee..66aa9f7bc 100644 --- a/apps/common/management/commands/services/services/gunicorn.py +++ b/apps/common/management/commands/services/services/gunicorn.py @@ -23,7 +23,7 @@ class GunicornService(BaseService): '-k', 'uvicorn.workers.UvicornWorker', '-w', str(self.worker), '--max-requests', '10240', - '--max-requests-jitter', '5120', + '--max-requests-jitter', '2048', '--access-logformat', log_format, '--access-logfile', '-' ]