doujiang24 / lua-resty-kafka

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

Memory leak when using async method for producing Kafka messages #8

Closed switzer closed 7 years ago

switzer commented 9 years ago

Hi - We are running a portion of our network through OpenResty / Kafka using your driver, in order to test it out. We are producing about 100-200 messages per second onto Kafka.

When we set producer_type = async, memory utilization increases until the following error is output to our logs:

*emergency(): Unable to connect to kafka: buffer overflow

Can you please help us understand what is causing this memory leak? Thanks!

doujiang24 commented 9 years ago

Thanks for your test, this error message looks strange Could you provide the test sample code, and which version of lua-resty-kafka are you using? It's better to test on the master branch, the old version months ago may lead to memory leak when kafka server is down.

yamyamyuo commented 7 years ago

@switzer Hi, did you fixed this issue?

switzer commented 7 years ago

@yamyamyuo we did. I believe that we changed the message format on our side, and it worked. No change needed in OpenResty.