-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwsgi.ini
45 lines (37 loc) · 1.39 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
42
43
44
[uwsgi]
module=facematch.wsgi
pythonpath=/home/webapper/facematch
processes = %(_)
# Process startup and shutdown
auto-procname = 1
no-orphans = 1
vacuum = 1
procname-prefix-spaced = facematch
master = 1
enable-threads = 1
hook-master-start = unix_signal:15 gracefully_kill_them_all
# Http serving
shared-socket = 0.0.0.0:8080
http = =0
http-keepalive = 0
http-auto-chunked = 1
offload-threads = %k
# Logging
log-format = {"message": "%(method) %(uri) -> %(status)", "when": "%(ltime)", "username": "%(username)", "httpRequest": {"requestMethod": "%(method)", "requestUrl": "%(uri)", "protocol": "%(proto)", "status": %(status), "remoteIp": "%(addr)", "responseSize": %(rsize), "latency": "%(secs)s", "userAgent": "%(uagent)"}, "rss": %(rssM), "pid": %(pid), "request_id": "%(request_id)", "timestamp": "%(time)", "ctx_switches": %(switches), "core": %(core), "severity": "INFO", "forwardedProto": "%(var.HTTP_X_FORWARDED_PROTO)"}
threaded-logger = 1
memory-report = 1
# Avoid errors on aborted client connections
ignore-sigpipe = 1
ignore-write-errors = 1
disable-write-exception = 1
# Limits, and kill requests after 60 seconds
harakiri-verbose = 1
buffer-size = 16384
http-timeout = 60
reload-on-rss = 900
evil-reload-on-rss = 1000
worker-reload-mercy = 120
socket-timeout = 30
mime-file = /etc/mime.types
# Close connections on errors
error-route-if-not = startswith:${uwsgi[status]};20 addheader:Connection: close