-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuwsgi.ini
More file actions
60 lines (49 loc) · 1.8 KB
/
Copy pathuwsgi.ini
File metadata and controls
60 lines (49 loc) · 1.8 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[uwsgi]
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html
strict = true # Fail if any option is unknown
# Use base ini file to configure common settings
include = /etc/uwsgi/uwsgi-base.ini
http = :8000
http-timeout = 60
wsgi-file = tirehtoori/wsgi.py
static-map = /__static=/app/static
uid = nobody
gid = nogroup
enable-threads = true
py-call-uwsgi-fork-hooks = true
master = true
processes = $(UWSGI_PROCESSES)
threads = $(UWSGI_THREADS)
buffer-size = 65535
# by default uwsgi reloads on SIGTERM instead of terminating
# this makes container slow to stop, so we change it here
die-on-term = true
# Kill a worker after 20 seconds of processing a request
harakiri = 20
harakiri-graceful-timeout = 5
# Default listen queue is 100
harakiri-queue-threshold = 80
# Reload workers regularly to keep memory fresh
# and ease potential memory leaks
max-requests = 1000 # Restart workers after this many requests
reload-on-rss = 300 # Restart workers after this much resident memory
worker-reload-mercy = 60 # How long to wait before forcefully killing workers (default is 60)
# Suppress errors about clients closing sockets, happens with nginx as the ingress when
# http pipes are closed before workers has had the time to serve content to the pipe
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true
plugin-dir = /usr/local/lib/uwsgi/plugins
# Sentry logging for uWSGI
if-env = ENABLE_SENTRY_UWSGI_PLUGIN
print = Enabled sentry logging for uWSGI
plugin = sentry
alarm = logsentry sentry:dsn=$(SENTRY_DSN),logger=uwsgi.sentry
# Log full queue, segfault and harakiri errors to Sentry
alarm-backlog = logsentry
alarm-segfault = logsentry
alarm-log = logsentry HARAKIRI \[core.*\]
endif =
# don't log readiness and healthz endpoints
route = ^/__readiness$ donotlog:
route = ^/__healthz$ donotlog: