lua-resty-redis
lua-resty-redis copied to clipboard
Frosen while operation keys("*")
trafficstars
Hello I use this code to get all data from db Count of all is 200k One record contain 10 symbols
local master, err = rc:connect_via_sentinel(params)
local res, err = master:keys("*")
if not res then
ngx.say("Failed to get fingerprints of certificates: ", err)
return
end
if res == ngx.null or table.getn(res) == 0 then
ngx.say("Fingerprints not found.")
return
else
ngx.say("All fingerprints")
for i, r in pairs(res) do
ngx.say(i, ") ", r)
end
end
I get master from sentinel and work with it . So I don't include code of getting master It works fine with not more records
@AlexProfi I don't understand what your problem is. It's too vague to me. Maybe you are just fetching too much data out of redis at a single time and exhausting your machine's memory (like triggering swapping)?