Open lzle opened 1 year ago
I found the problem, it was caused by the table, next is demo, the memory will not release.
local table_new = require("table.new")
function _M.rewrite()
local queue = table_new(10240000, 0)
local message = string.rep('a', 1024)
for i = 1, 10240000 do
queue[i] = message .. i
end
for i = 1, 10240000 do
queue[i] = nil
end
ngx.log(ngx.INFO, 'collectgarbage')
collectgarbage("collect")
front_resp.quit_normal()
end
The memory will not be released, even if collectgarbage("collect") is executed. thanks!