-
Notifications
You must be signed in to change notification settings - Fork 61
/
uwsgi.ini
38 lines (38 loc) · 1.92 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
[uwsgi]
;https://www.bloomberg.com/company/stories/configuring-uwsgi-production-deployment/
chdir = ${CONFIG_DATA_PATH}
pyargv = /mapproxy.yaml
wsgi-file = ${MAPPROXY_APP_DIR}/app.py
pidfile=/tmp/mapproxy.pid
http = 0.0.0.0:8080
processes = ${PROCESSES} ; Maximum number of workers allowed
cheaper = ${CHEAPER} ; Minimum number of workers allowed
enable-threads = true
threads = ${THREADS}
master = true
vacuum = true
die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn)
need-app = 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
disable-logging = ${DISABLE_LOGGING}
log-4xx = ${LOG4XX}
log-5xx = ${LOG5XX}
wsgi-disable-file-wrapper = true
memory-report = true
harakiri = 60
py-callos-afterfork = true ; allow workers to trap signals
cheaper-algo = busyness
cheaper-initial = ${CHEAPER} ; Workers created at startup
cheaper-overload = 1 ; Length of a cycle in seconds
cheaper-step = ${CHEAPER} ; 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 = 70 ; Above this threshold, spawn new workers
cheaper-busyness-backlog-alert = ${CHEAPER} ; 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
chmod-socket = 664
uid = ${MAPPROXY_USER_ID}
gid = ${MAPPROXY_GROUP_ID}