通过tengine 记录 POST 数据报错 相关nginx 配置:
server {
listen 80 backlog=20480;
server_name c.xxx.com
client_body_buffer_size 128k;
location = /m1.htm{
lua_need_request_body on;
root /data/webroot/www/beibei;
#access_log /logs/click/bbappv1.log click;
access_log "pipe:/usr/sbin/cronolog -p30min /data/10-10-111-37.%s" click;
content_by_lua "ngx.exit(ngx.HTTP_OK)";
}
}
具体报错信息:
2018/09/10 20:55:34 [alert] 26143#0: *33275607570 write() to "The pipe" was incomplete: 65536 of 110509 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:35 [alert] 26127#0: *33275611755 write() to "The pipe" was incomplete: 54925 of 75405 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:37 [alert] 26144#0: *33275621339 write() to "The pipe" was incomplete: 65536 of 75996 while logging request, client: 11.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:38 [alert] 26146#0: *33275622079 write() to "The pipe" was incomplete: 65536 of 104438 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:38 [alert] 26143#0: *33275624581 write() to "The pipe" was incomplete: 65536 of 89734 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:41 [alert] 26144#0: *33275633751 write() to "The pipe" was incomplete: 65536 of 66415 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:41 [alert] 26143#0: *33275634504 write() to "The pipe" was incomplete: 65536 of 67036 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:41 [alert] 26130#0: *33275635201 write() to "The pipe" was incomplete: 65536 of 69098 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:42 [alert] 26116#0: *33275637272 write() to "The pipe" was incomplete: 65536 of 69983 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:43 [alert] 26118#0: *33275641762 write() to "The pipe" was incomplete: 65536 of 104337 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:49 [alert] 26127#0: *33275664618 write() to "The pipe" was incomplete: 65536 of 73073 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:51 [alert] 26146#0: *33275669435 write() to "The pipe" was incomplete: 65536 of 316774 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:51 [alert] 26135#0: *33275669969 write() to "The pipe" was incomplete: 65536 of 118549 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:53 [alert] 26115#0: *33275678436 write() to "The pipe" was incomplete: 65536 of 71883 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
2018/09/10 20:55:56 [alert] 26130#0: *33275688373 write() to "The pipe" was incomplete: 65536 of 152103 while logging request, client: 1.1.1.1, server: c.xxx.com, request: "POST /m1.htm HTTP/1.1", host: "c.xxx.com"
是否要调整某些配置参数?
5条答案
按热度按时间cgyqldqp1#
通过管道pipe方式记录日志,每条日志是有大小限制的。
olhwl3o22#
那有办法修改参数解决吗?
yzxexxkh3#
可以不通过pipe的方式记录日志,然后通过设置access_log的buffer大小来控制,详细请参考 http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log
qlvxas9a4#
可以不通过pipe的方式记录日志,然后通过设置access_log的buffer大小来控制,详细请参考 http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log
这个pipe_buffer是通过哪个内核参数调整的呢?
myss37ts5#
很久以前看到是在源代码里硬编码的, 不过不了解新版本的情况