0

我有一个 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
4

2 回答 2

0

愚蠢的我,我在 /var 中遇到了文件夹所有权问题,我将所有内容都重置为 root,因此 nginx 在 /var/lib/nginx 中写入文件的权限错误

chmod -R www-data:www-data /var/lib/nginx

修复。

于 2013-10-30T20:35:23.837 回答
0
chown -R www-data:www-data /var/lib/nginx
于 2016-06-12T06:28:25.120 回答