我有一个 uwsgi+nginx+django 开发设置,并且在 uwsgi 提供更大的静态文件时遇到了一点问题,例如。Leaflet.js 的大小为 120487,导致以下错误:
SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /static/js/lib/leaflet/leaflet.js (ip 125.236.123.123) !!!
uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 296]
这是ini
[uwsgi]
socket = /tmp/%n.sock
master = true
processes = 5
env = DJANGO_SETTINGS_MODULE=abc.settings
module = django.core.handlers.wsgi:WSGIHandler()
pythonpath = /var/www/abc/abc
chdir = /var/www/abc/abc
chmod-socket = 666
uid = www-data
virtualenv = /var/www/abc
vacuum = true
procname-prefix-spaced = %n
cheaper = 1
plugins = python
enable-threads = true
single-interpreter = true
sharedarea = 4