]> git.parisson.com Git - teleforma.git/commitdiff
increase listen connections to 4096, decrease num of workers
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 6 Jul 2026 08:30:41 +0000 (10:30 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 6 Jul 2026 08:30:41 +0000 (10:30 +0200)
app/wsgi.ini

index 671cc3e034b22938511e2cffb29cfde76865f7ea..25862cf3340b01a453cf792866a56d309cd01f09 100644 (file)
@@ -5,6 +5,7 @@ chdir = /srv/app/
 module = wsgi
 touch-reload = /srv/app/wsgi.py
 chmod-socket = 664
+listen = 4096
 
 uid = www-data
 gid = www-data
@@ -32,7 +33,7 @@ harakiri = 300                       ; forcefully kill workers after 60 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 = 600             ; How long to wait before forcefully killing workers
+worker-reload-mercy = 60             ; How long to wait before forcefully killing workers
 
 # We don't expect abuse so lets have fastest respawn possible
 forkbomb-delay = 0
@@ -41,7 +42,7 @@ forkbomb-delay = 0
 thunder-lock = true
 
 cheaper-algo = busyness
-processes = 512                      ; Maximum number of workers allowed
+processes = 256                      ; Maximum number of workers allowed
 #threads = 2
 cheaper = 30                         ; Minimum number of workers allowed
 cheaper-initial = 30                 ; Workers created at startup