-
Notifications
You must be signed in to change notification settings - Fork 1
/
uwsgi.ini
41 lines (33 loc) · 1.28 KB
/
uwsgi.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[uwsgi]
module = wsgi
callable = application
need-app = true
stats = 127.0.0.1:9191
stats-http
memory-report
vacuum = true
socket = 127.0.0.1:9800
;socket = /var/www/uwsgi.sock
chmod-socket = 664
chdir = /var/www/
base = /var/www
buffer-size = 65535 ; see https://uwsgi-docs.readthedocs.io/en/latest/Options.html#buffer-size
touch-reload = /var/www/wsgi.py
master = true
cheaper-algo = busyness
processes = %(%k + 1) ; Maximum number of workers allowed
threads = 2 ; Minimum number of threads allowed
cheaper = 2 ; Minimum number of workers allowed
cheaper-initial = 5 ; Workers created at startup
cheaper-overload = 1 ; Length of a cycle in seconds
cheaper-step = 1 ; How many workers to spawn at a time
# logging
disable-logging = true
log-4xx = true
log-5xx = true
max-requests = 1000 ; Restart workers after this many requests
max-worker-lifetime = 3600 ; Restart workers after this many seconds
reload-on-rss = 2048 ; Restart workers after this much resident memory
worker-reload-mercy = 60 ; How long to wait before forcefully killing workers
# cue
# https://www.techatbloomberg.com/blog/configuring-uwsgi-production-deployment/