Open RussianCatYakov opened 10 months ago
please don't call memc:close() to close the connection after the put operation. Instead, you should use memc:set_keepalive to reuse the connection.
local ok, err = memc:set_keepalive(10000, 100)
if not ok then
ngx.say("cannot set keepalive: ", err)
return
end
Hi, I have the following code executed on each request:
put operation is happening in other internal location in case proxy origin receives 302 redirect
Recently I noticed that connections are not really closed but stay idle for some time. And it's count is pretty high. I have memcached running in docker contrainer like this
nginx itself handles 4k rps nonstop
And netstat shows this
lua module version is 0.16
Please help me solve this issue, thank you in advance.