nginx 模块 Empty reply from server,是因磁盘满了导致的。

Server 林涛 15438℃ 0评论

示例:2015/12/28 08:08:58 [crit] 11211#0: *17357067 writev() "/alidata/server/nginx/fastcgi_temp/0/03/0000041030" failed (28: No space left on device) while reading upstream, client: 140.205.253.138, server: **********.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.**********.com", referrer: "http://www.*********.com"

于是查到了下面的帖子,用来备份:

curl "http://justwinit.cn/post/7634/" curl: (52) Empty reply from server,我估计是Nginx的缓存cgi动态为静态的模块可能出了点问题。

今天调试nginx 模块,使用 curl 发http 请求,结果得到这么个错“Empty reply from server”,死活不得其解。

后来,使用gdb调试另外一个东西,还没到断点处就停了,执行下一步,就挂掉了。这时看curl的返回,正是“Empty reply from server”。

ps 发现原来nginx子进程已经没了,换成了新的(如果有子进程挂掉,nginx会启动一个新的)。

就这两个模块:

http://www.grid.net.ru/nginx/upload.en.html

http://labs.frickle.com/nginx_ngx_cache_purge/

顺带升级了一下nginx为1.7.7好像就有上面这个问题,加一个nginx_upload_module模块(编译不过去,后来去了。),重新编译一次nginx,问题依旧:

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
--add-module=../ngx_cache_purge-2.1 --add-module=../nginx_upload_module-2.2.0

最终问题从nginx的error里查到:

2014/11/22 14:38:14 [crit] 8855#0: *260 writev() "/usr/local/nginx/fastcgi_temp/9/08/0000000089" failed (28: No space left on device) while reading upstream, client: 27.150.222.72, server: justwinit.cn, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.justwinit.cn", referrer: "http://www.justwinit.cn/"

是nginx中fastcgi的一个缓存文件,磁盘满了,我靠,查了好一会喔。

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        14G   13G   16M 100% /

___________________________________________________________

Nginx-1.3.X,Nginx-1.4.X安装nginx_upload_module-2.2.0.tar.gz会有点问题,报

/opt/nginx_upload_module-2.2.0/ngx_http_upload_module.c: In function ‘ngx_http_read_upload_client_request_body’: /opt/nginx_upload_module-2.2.0/ngx_http_upload_module.c:2628: 错误:‘ngx_http_request_body_t’ 没有名为 ‘to_write’ 的成员

../nginx_upload_module-2.2.0/ngx_http_upload_module.c: 在函数‘ngx_http_read_upload_client_request_body’中:

../nginx_upload_module-2.2.0/ngx_http_upload_module.c:2628: 错误:‘ngx_http_request_body_t’没有名为‘to_write’的成员

../nginx_upload_module-2.2.0/ngx_http_upload_module.c:2687: 错误:‘ngx_http_request_body_t’没有名为‘to_write’的成员

../nginx_upload_module-2.2.0/ngx_http_upload_module.c: 在函数‘ngx_http_do_read_upload_client_request_body’中:

../nginx_upload_module-2.2.0/ngx_http_upload_module.c:2769: 错误:‘ngx_http_request_body_t’没有名为‘to_write’的成员

../nginx_upload_module-2.2.0/ngx_http_upload_module.c:2785: 错误:‘ngx_http_request_body_t’没有名为‘to_write’的成员

../nginx_upload_module-2.2.0/ngx_http_upload_module.c:2877: 错误:‘ngx_http_request_body_t’没有名为‘to_write’的成员

选择Nginx-1.2.X的就没问题。

如需转载请注明: 转载自26点的博客

本文链接地址: nginx 模块 Empty reply from server,是因磁盘满了导致的。

转载请注明:26点的博客 » nginx 模块 Empty reply from server,是因磁盘满了导致的。

喜欢 (0)
发表我的评论
取消评论

表情