uwsgi.ini 1.32 KB
Newer Older
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
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /usr/src/app/backend
# Django's wsgi file
module          = base_app.wsgi:application

# process-related settings
# master
master          = true
# maximum number of worker processes
processes       = 4
# the socket (use the full path to be safe
socket          = /usr/src/socket/rex-dri.sock
# ... with appropriate permissions - may be needed
# 666 needed for nginx to communicate with it
chmod-socket    = 666
# clear environment on exit
vacuum          = true

# env = DJANGO_SETTINGS_MODULE=mysite.settings # set an environment variable
harakiri = 20 # respawn processes taking more than 20 seconds
limit-as = 2500 # limit the project to 2500 MB
max-requests = 2000 # respawn processes after serving 2000 requests to hard clean the memory
max-requests-delta = 100 # add (worker_id * 100) requests to the max_requests value of each worker
27
max-worker-lifetime = 600 # reload workers at least every 10 minutes
28
29
30
# daemonize = /var/log/uwsgi/rex-dri.log # background the process & log TODO not working
pidfile = /tmp/project-master.pid # create a pidfile

Florent Chehab's avatar
Florent Chehab committed
31
32
33
# Some users had too many cookies
buffer-size = 6144

34
35
36
37
38
# Cron setup
spooler = /usr/src/spooler
; load the task.py module
import = cron_tasks.py

39
40
# Logging Logging is handled directly in Django
disable-logging = true