-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwsgi.ini
59 lines (50 loc) · 2.61 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# section header for uWSGI configuration.
[uwsgi]
# Specifies that uWSGI should listen on this port for HTTP requests.
http = :5000
# Enables the Proxy Protocol, which allows passing client connection information (like the client's IP address) to the uWSGI server when it is behind a reverse proxy server (like nginx).
http-enable-proxy-protocol = 1
# Enables automatic chunked transfer encoding for HTTP responses. This can be useful when the response size is not known in advance.
http-auto-chunked = true
# Sets the HTTP keep-alive timeout to 75 seconds. This determines how long the server keeps an idle connection open before closing it.
http-keepalive = 75
# Sets the maximum time (in seconds) the server will wait for a response from the application before considering it timed out.
http-timeout = 75
# unix_domain_socket.sock file is created by uwsgi in the directory where uwsgi.ini file is placed.
socket = unix_domain_socket.sock
# Read, Write permissions for unix_domain_socket.sock file.
chmod-socket = 666
# Sets the maximum size (in bytes) of the buffer used for communication between uWSGI and the web server (e.g., Nginx).
buffer-size = 65535
# Specifies the path to the WSGI file containing the uWSGI application (Flask app in this case).
wsgi-file = app.py
# Specifies the callable object in the WSGI file that represents the uWSGI application.
callable = app
# This enables lazy application loading, meaning uWSGI will load the application when the first request arrives.
lazy-apps = true
# Enables the "vacuum" mode, which cleans up sockets and files at startup.
vacuum = true
# Enables uWSGI master process mode.
master = true
# Specifies the number of uWSGI worker processes to spawn.
processes=1
# Sets the number of threads to spawn for each uWSGI worker.
threads=1
# Forces the uWSGI workers to be terminated when the master process receives a termination signal.
die-on-term = true
# Restarts uWSGI workers after they handle this many requests.
max-requests = 5000
# Restarts uWSGI workers after they exceed this much KB of resident memory (memory assigned to a worker process) (Resident Set Size - RSS).
reload-on-rss = 2048
# Specifies the time (in seconds) to wait before forcefully killing uWSGI workers during a reload.
worker-reload-mercy = 60
# Sets the maximum time (in seconds) a request can take before being forcefully killed.
harakiri = 60
# Disables built-in logging in uWSGI.
disable-logging = true
# Enables logging of 4xx HTTP responses.
log-4xx = true
# Enables logging of 5xx HTTP responses.
log-5xx = true
# Enables strict mode for uWSGI, which disables some non-essential features to reduce memory usage.
strict = true