Commit 57073bad authored by sim's avatar sim

[CONF] Clean uWSGI configuration

parent 6eb50501
...@@ -6,69 +6,34 @@ DB_PASS = C8kdcUrAQy66U ...@@ -6,69 +6,34 @@ DB_PASS = C8kdcUrAQy66U
[uwsgi] [uwsgi]
env = DJANGO_SETTINGS_MODULE=gargantext.settings # See: http://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html
#module = django.core.handlers.wsgi:WSGIHandler() # And: http://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html
plugins = python35 # Tip from: https://serverfault.com/questions/411361/uwsgi-ini-configuration-for-python-apps
if-env = VIRTUAL_ENV
# the base directory print = [uWSGI] launched from virtualenv %(_)
chdir = /srv/gargantext virtualenv = %(_)
endif =
# Django's wsgi file
#module = wsgi # unix socket is better than TCP one, there is less overhead
wsgi-file = /srv/gargantext/gargantext/wsgi.py socket = /tmp/gargantext.sock
# the virtualenv chmod-socket = 664
home = /srv/env_3-5 # user running uwsgi MUST be a member of www-data group
chown-socket = %U:www-data
lazy-apps = True # wsgi django module
module = gargantext.wsgi:application
# master # about master: http://uwsgi-docs.readthedocs.io/en/latest/Management.html?highlight=master#reloading-the-server
master = true master = True
# can do: uwsgi --stop /tmp/gargantext.pid
# maximum number of processes pidfile = /tmp/gargantext.pid
processes = 10
# the socket (use the full path to be safe)
socket = /tmp/gargantext.sock
threads = 4
# with appropriate permissions - *may* be needed
chmod-socket = 666
# clear environment on exit # clear environment on exit
vacuum = true vacuum = True
max-requests = 5000
pidfile = /tmp/gargantext.pid
# touch /tmp/gargantext.reload to reload configuration (after git pull for instance)
touch-reload = /tmp/gargantext.reload
# respawn processes taking more than 20 seconds
harakiri = 1200
post-buffering=8192
# limit the project to 128 MB
#limit-as = 128
# respawn processes after serving 5000 requests
max-requests = 5000
# background the process & log # background the process & log
#daemonize = /var/log/uwsgi/gargantext.log daemonize = /var/log/gargantext/uwsgi/@(exec://date +%%Y-%%m-%%d).log
daemonize = /var/log/gargantext/uwsgi/@(exec://date +%%Y-%%m-%%d_%%H%%M).log logfile-chmod = 644
log-reopen = true # one log file per day
log-reopen = true
#uid = 1000 # touch /tmp/gargantext.reload to reload configuration (after git pull for instance)
#gid = 1000 touch-reload = /tmp/gargantext.reload
#
how-config=true
disable-logging=false
logfile-chmod=644
#logfile-chown=false
log-maxsize=500000000
##logto=%(chdir)logs/uwsgi_access.log
#logger = longquery file:%(chdir)logs/uwsgi_long.log
#log-route = longquery msec
#
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment