Created
February 5, 2014 04:48
-
-
Save ikatson/8817587 to your computer and use it in GitHub Desktop.
The work of process 13041 is done. Seeya!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
##### Basic requried config for app to work #### | |
home = /home/trip/.virtualenvs/trip/ | |
chdir = /home/trip/trip/ | |
pythonpath = /home/trip/trip/ | |
env = LANG=en_US.UTF-8 | |
env = SERVER_SOFTWARE=gevent | |
env = DJANGO_SETTINGS_MODULE=settings | |
# Gevent is our execution model of choice :) Required for many features | |
gevent = 1000 | |
# This wsgi script contains gevent and gevent_psycopg2 setup. | |
wsgi = deploy.gevent_wsgi | |
#### production uWSGI configuration #### | |
master = true | |
# 25 seconds is the timeout for ajax polling. 30 should be enough to kill | |
# anything else. But with "30" I got a | |
harakiri = 60 | |
# We almost always have pending polling ajax requests, which block reloads | |
# for a long time, so setting this low enough not to interrupt site's work. | |
reload-mercy = 5 | |
worker-reload-mercy = 5 | |
# This lowers master process memory usage. | |
# The other option is to use KVM for memory deduplication but there's not | |
# much sense in it with a single core and one gevent process. | |
lazy-apps = true | |
socket = /home/trip/trip/deploy/uwsgi.sock | |
logto = /home/trip/trip/logs/uwsgi.log | |
# The date is not logged by default, so the log's output becomes a mess. | |
log-date = | |
chmod-socket = 770 | |
# The request logs are too nasty + logging /crm/ajax/event_updates is nonsense | |
disable-logging = | |
# Lots of write errors happen when a page with pending ajax requests is closed | |
ignore-write-errors = | |
ignore-sigpipe = | |
touch-reload = /tmp/trip-reload | |
# Buffer all post requests larger than 1 MB. | |
# NOTE: Having this unset probably was the reason of 499 error and complaints. | |
post-buffering = 1048576 | |
# Reload if the process occupies more than 300mb | |
reload-on-rss = 300 | |
# Some long requests do not fit into default 4096 limit, e.g. some crm | |
# requests and django-debug-toolbar requests | |
# Not, values higher than 65535 do not work. | |
buffer-size=65535 | |
# Playing with statistics | |
stats=/tmp/trip-stats.socket | |
# This possible causes crm to always reload without reason. | |
# reload-on-exception=true | |
# See this: http://comments.gmane.org/gmane.comp.python.wsgi.uwsgi.general/6014 | |
close-on-exec= | |
# TODO: change descent to trip | |
logfile-chown = descent | |
uid = descent | |
gid = descent | |
chown-socket = descent:www-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment