]> git.parisson.com Git - teleforma.git/commitdiff
try unix socket
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 29 Jun 2021 22:18:40 +0000 (00:18 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 29 Jun 2021 22:18:40 +0000 (00:18 +0200)
app/wsgi.ini
docker-compose.yml

index 32a8854c2ad09a75d868527ac47c7de3408b474f..98f5db965c032dd30ddee1d045df8d0c77990166 100644 (file)
@@ -1,9 +1,10 @@
 [uwsgi]
 
-socket = 0.0.0.0:8000
+socket = /srv/app/wsgi.socket
 chdir = /srv/app/
 module = wsgi
 touch-reload = /srv/app/wsgi.py
+chmod-socket = 664
 
 uid = www-data
 gid = www-data
@@ -29,7 +30,7 @@ reload-on-rss = 2048                 ; Restart workers after this much resident
 worker-reload-mercy = 60             ; How long to wait before forcefully killing workers
 
 cheaper-algo = busyness
-processes = 28                      ; Maximum number of workers allowed
+processes = 28                       ; Maximum number of workers allowed
 cheaper = 8                          ; Minimum number of workers allowed
 cheaper-initial = 16                 ; Workers created at startup
 cheaper-overload = 1                 ; Length of a cycle in seconds
@@ -37,7 +38,7 @@ cheaper-step = 4                     ; 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)
-cheaper-busyness-max = 90            ; Above this threshold, spawn new workers
+cheaper-busyness-max = 70            ; Above this threshold, spawn new workers
 cheaper-busyness-backlog-alert = 16  ; Spawn emergency workers if more than this many requests are waiting in the queue
 cheaper-busyness-backlog-step = 2    ; How many emergency workers to create if there are too many requests in the queue
 
index 267fe5454728a35543a668c864a163b15c3e9b1f..246607540c2774e359f316608e2b31c32c95d178 100644 (file)
@@ -17,6 +17,7 @@ services:
       - ./var/static:/srv/static
       - ./var/log/app:/var/log/app
       - ./var/log/uwsgi:/var/log/uwsgi
+      - ./app/wsgi.socket:/srv/app/wsgi.socket
     links:
       - postgres
       - redis