我的设置是django1.8 + uwsgi2.0.11.1 + nginx以及下一个build-options:
nginx version: nginx/1.8.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-cc-opt=-Wno-error --with-pcre=/home/username/sources/pcre-8.37 --with-pcre --with-http_gzip_static_module --add-module=/home/username/sources/ngx_devel_kit-0.2.19 --add-module=/home/username/sources/set-misc-nginx-module-0.29
和uwsgi config:
[uwsgi]
chdir = /home/aviasales/jr-content
wsgi-file = lib/nginx/wsgi.py
touch-reload = lib/nginx/touch_for_uwsgi_reload
home = /home/aviasales/Envs/jetradar
daemonize = /home/aviasales/jr-content/logs/uwsgi.log
stats = 0.0.0.0:1717
die-on-term
master = true
processes = 10
socket = /home/aviasales/jr-content/lib/nginx/unix.sock
chmod-socket = 664
max-requests = 5000
vacuum = true
# NewRelic requirements
enable-threads = true
single-interpreter = true
uwsgi进程在5000次请求后不会重新启动:(