forked from pypi/warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuwsgi.ini
39 lines (34 loc) · 1.45 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
[uwsgi]
;; setup
master
http-socket = :$(PORT)
procname-prefix-spaced = warehouse ; fancy procname
die-on-term = true ; make SIGTERM shut down uwsgi, this won't be needed with uwsgi 2.1
;; application
wsgi = warehouse.wsgi
;; This is a little complicated, but essentially uWSGI defaults to a behavior
;; that attempts to reduce the number of mallocs it requires to process a WSGI
;; request by preallocating the request dictionaries and populating it for each
;; each, and then after the request is over, clearing out the environment. This
;; breaks things like pyramid_debugtoolbar where it expects to be able to store
;; the request (and the environ variable) across many individual requests for
;; logging purposes. Instead, we'll switch uWSGI to use the "holy" behavior,
;; which will allocate and deallocate a new dictionary for each request, which
;; allows pyramid_debugtoolbar to work.
wsgi-env-behavior = holy
;; processes
single-interpreter
enable-threads
thunder-lock
threads = 20
;; protection
buffer-size = 32768 ; max size of request headers, no body
harakari = 60 ; timeout before killing the process on a slow request
socket-timeout = 60
listen = 128 ; size of socket listen queue
reload-on-rss = 80 ; max size for each process before we'll gracefully reload it
;; logging
disable-logging = true ; access logs
log-5xx ; logs for 5xx
ignore-sigpipe ; annoying logs
ignore-write-errors ; annoying logs