]> git.parisson.com Git - teleforma.git/commitdiff
update uwsgi params
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 6 Jul 2026 08:11:51 +0000 (10:11 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 6 Jul 2026 08:11:51 +0000 (10:11 +0200)
app/wsgi.ini

index 251babbf5f897e263c90c8f8b3f50a46e3ce0dca..671cc3e034b22938511e2cffb29cfde76865f7ea 100644 (file)
@@ -12,15 +12,14 @@ gid = www-data
 strict = true
 master = true
 enable-threads = true
-vacuum = false                        ; Delete sockets during shutdown
+vacuum = true                        ; Delete sockets during shutdown
 single-interpreter = true
 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)
-close-on-exec = true
-close-on-exec2 = true
-
+#close-on-exec = true
+#close-on-exec2 = true
 
 disable-logging = false              ; Disable built-in logging
 log-4xx = true                       ; but log 4xx's anyway
@@ -30,10 +29,10 @@ logger = file:/var/log/app/app.log
 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
-max-worker-lifetime = 18000          ; Restart workers after this many seconds
+max-requests = 40000                 ; Restart workers after this many requests
+max-worker-lifetime = 36000          ; Restart workers after this many seconds
 reload-on-rss = 4096                 ; Restart workers after this much resident memory
-worker-reload-mercy = 60             ; How long to wait before forcefully killing workers
+worker-reload-mercy = 600             ; How long to wait before forcefully killing workers
 
 # We don't expect abuse so lets have fastest respawn possible
 forkbomb-delay = 0
@@ -42,12 +41,12 @@ forkbomb-delay = 0
 thunder-lock = true
 
 cheaper-algo = busyness
-processes = 256                      ; Maximum number of workers allowed
+processes = 512                      ; Maximum number of workers allowed
 #threads = 2
-cheaper = 32                         ; Minimum number of workers allowed
-cheaper-initial = 32                 ; Workers created at startup
-cheaper-overload = 10                ; Length of a cycle in seconds
-cheaper-step = 24                    ; How many workers to spawn at a time
+cheaper = 30                         ; Minimum number of workers allowed
+cheaper-initial = 30                 ; Workers created at startup
+cheaper-overload = 3                ; Length of a cycle in seconds
+cheaper-step = 8                    ; 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)