From 816ce297d0989a030de799c00f8f5b27a64472d6 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 21 Jul 2023 11:48:31 +0200 Subject: [PATCH] improve uwsgi config --- app/wsgi.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/wsgi.ini b/app/wsgi.ini index 374f1694..19d49938 100644 --- a/app/wsgi.ini +++ b/app/wsgi.ini @@ -12,9 +12,9 @@ gid = www-data strict = true master = true enable-threads = true -vacuum = true ; Delete sockets during shutdown +vacuum = false ; Delete sockets during shutdown single-interpreter = true -die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) +die-on-term = false ; Shutdown when receiving SIGTERM (default is respawn) need-app = true # Close fds on fork (don't allow subprocess to mess with parent's fds) @@ -22,12 +22,12 @@ close-on-exec = true close-on-exec2 = true -disable-logging = false ; Disable built-in logging +disable-logging = false ; Disable built-in logging log-4xx = true ; but log 4xx's anyway log-5xx = true ; and 5xx's logger = file:/var/log/app/app.log -harakiri = 300 ; forcefully kill workers after 60 seconds +harakiri = 300 ; forcefully kill workers after 60 seconds #py-callos-afterfork = true ; allow workers to trap signals max-requests = 20000 ; Restart workers after this many requests @@ -42,12 +42,12 @@ forkbomb-delay = 0 thunder-lock = true cheaper-algo = busyness -processes = 128 ; Maximum number of workers allowed +processes = 192 ; Maximum number of workers allowed #threads = 2 cheaper = 24 ; Minimum number of workers allowed -cheaper-initial = 24 ; Workers created at startup -cheaper-overload = 1 ; Length of a cycle in seconds -cheaper-step = 8 ; How many workers to spawn at a time +cheaper-initial = 32 ; Workers created at startup +cheaper-overload = 10 ; Length of a cycle in seconds +cheaper-step = 16 ; How many workers to spawn at a time cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) -- 2.39.5