doujiang24 / lua-resty-kafka

Lua kafka client driver for the Openresty based on the cosocket API
BSD 3-Clause "New" or "Revised" License
802 stars 275 forks source link

buffered messages send to kafka err timeout #55

Closed godocean closed 6 years ago

godocean commented 7 years ago

nginx error log: [error] 30952#0: 30248161 lua tcp socket read timed out, context: ngx.timer, client: xxxx, server: xxxx [error] 30952#0: 30248161 [lua] producer.lua:258: buffered messages send to kafka err: timeout, retryable: nil, topic:xxxx, partition_id: 1, length: 1, context: ngx.timer, client: xxxx, server: xxxx

but it did not happen frequently. kafka works fine and everything is OK, I have set request_timeout 10000ms like this:

local bp = producer:new(broker_list, { producer_type = "async", request_timeout = 10000 })

but it seems to be not work. could you give me a favor?

lufeng1102 commented 7 years ago

Hi @godocean , Hive you fixed this issue yet? I have meet the same issue.

godocean commented 6 years ago

maybe you should change another log collector component such as logstash, flume, etc, have a try, it works out

ghost commented 5 years ago

Maybe you sent too large msg? I get the same problem too. When I send short msg it will be all right. But when I send 50KB msg, this problem always be there.