赞
踩
2021/05/14 15:28:59 [warn] 19924#19924: *1 a client request body is buffered to a temporary file /usr/local/openresty/nginx/client_body_temp/0000000001, client: 192.168.244.107, server: localhost, request: “POST /ife HTTP/1.1”, host: “192.168.244.214:8887”
2021/05/14 15:29:00 [error] 19924#19924: *3 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/kafka/sendbuffer.lua:63: attempt to get length of local ‘msg’ (a nil value)
stack traceback:
coroutine 0:
/usr/local/openresty/lualib/resty/kafka/sendbuffer.lua: in function ‘add’
/usr/local/openresty/lualib/resty/kafka/producer.lua:254: in function </usr/local/openresty/lualib/resty/kafka/producer.lua:233>, context: ngx.timer, client: 192.168.244.107, server: 0.0.0.0:8887
当请求数据大于16K时,会写道临时文件, 导致lua中获取不到消息
local msg=ngx.req.get_body_data() //这里msg将会是空的
在nginx.conf 中设置
client_body_buffer_size 500k;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。