-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathuwsgi.ini
47 lines (39 loc) · 1.24 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
[uwsgi]
# placeholders that you have to change
my_app_folder = /home/harkous/Development/production_ml
my_user = harkous
socket = %(my_app_folder)/production_ml.sock
chdir = %(my_app_folder)
file = app.py
callable = app
# environment variables
env = CUDA_VISIBLE_DEVICES=-1
env = KERAS_BACKEND=theano
env = PYTHONPATH=%(my_app_folder):$PYTHONPATH
master = true
processes = 5
# allows nginx (and all users) to read and write on this socket
chmod-socket = 666
# remove the socket when the process stops
vacuum = true
# loads your application one time per worker
# will very probably consume more memory,
# but will run in a more consistent and clean environment.
lazy-apps = true
uid = %(my_user)
gid = %(my_user)
# uWSGI will kill the process instead of reloading it
die-on-term = true
# socket file for getting stats about the workers
stats = %(my_app_folder)/stats.production_ml.sock
# Scaling the server with the Cheaper subsystem
# 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 = 5
# number of workers to spawn at startup
cheaper-initial = 5
# maximum number of workers that can be spawned
workers = 50
# how many workers should be spawned at a time
cheaper-step = 3