]> git.parisson.com Git - teleforma.git/commitdiff
improve uwsgi config
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 21 Jul 2023 09:48:31 +0000 (11:48 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 21 Jul 2023 09:48:31 +0000 (11:48 +0200)
app/wsgi.ini

index 374f1694b7ad82f25fd625acee509b61f82ceba4..19d49938ded3d6200db1d118d0a8c40493d42bf0 100644 (file)
@@ -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 =                     ; 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)