-
Notifications
You must be signed in to change notification settings - Fork 1
/
uwsgi-analogui.ini
75 lines (56 loc) · 1.92 KB
/
uwsgi-analogui.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[uwsgi]
uid = cds
gid = cds
plugins = python36
pythonpath = /home/cds/analogues
chdir = /home/cds/analogues/webapps
touch-reload=/home/cds/analogues/webapps/analogui.py
; http://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html
check-static = /home/cds/analogues/webapps/static
check-static = /cache/analogues
check-static = /cache/data
; offload-threads = 1
socket = :7999
stats = 127.0.0.1:1717
daemonize = /var/log/cds/uwsgi-analogui.log
master = true
; https://uwsgi-docs.readthedocs.io/en/latest/Cheaper.html?highlight=memory#setting-memory-limits
# set cheaper algorithm to use, if not set default will be used
cheaper-algo = spare
# minimum number of workers to keep at all times
cheaper = 2
# number of workers to spawn at startup
cheaper-initial = 5
# maximum number of workers that can be spawned
workers = 500
# how many workers should be spawned at a time
cheaper-step = 1
# soft limit will prevent cheaper from spawning new workers
# if workers total rss memory is equal or higher
cheaper-rss-limit-soft = 6000000000
memory-report = true
# hard limit will force cheaper to cheap single worker
# if workers total rss memory is equal or higher
cheaper-rss-limit-hard = 8000000000
; module = analogues.analogues
; https://stackoverflow.com/questions/34252892/using-flask-sqlalchemy-in-multiple-uwsgi-processes
; lazy-apps = true
; callable = application
; http://uwsgi-docs.readthedocs.io/en/latest/Snippets.html
mount = /analogues=analogui.py
manage-script-name = true
;;
env=ANALOGUES_HOME=/home/cds/analogues
env=ANALOGUES_FILES=/cache/analogues
env=ANALOGUES_CACHE=/cache/data
; env=LD_LIBRARY_PATH=/opt/ecmwf/magics/lib
; env=MAGPLUS_INFO=on
; env=MAGPLUS_DEV=on
; env=MAGPLUS_DEBUG=on
# From uwgsi doc...
plugins = router_static
offload-threads = 16
static-safe = /cache
collect-header = X-Sendfile X_SENDFILE
response-route-if-not = empty:${X_SENDFILE} static:${X_SENDFILE}
static-safe = /home/cds/analogues/webapps/static