You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strings in luajit are infinitely bloated, even if they are not rereferenced in the lua vm. As a result, the memory resources of the nginx process RES are increasing to become larger and larger.
Minimal example code
resty example.lua
`
local function get_memory_usage()
local b = collectgarbage("count") * 1024
return b
end
local my_table = {}
for i = 1, 10000000 do
my_table[i] = string.rep("A" , 256) .. i
end
my_table = nil
print("start gc:", "mem:",get_memory_usage())
collectgarbage("collect")
print("end gc:", "mem:",get_memory_usage())
print("sleep 10m")
print("done")
ngx.sleep(60*10*6)
`
The text was updated successfully, but these errors were encountered:
Strings in luajit are infinitely bloated, even if they are not rereferenced in the lua vm. As a result, the memory resources of the nginx process RES are increasing to become larger and larger.
Minimal example code
resty example.lua
`
local function get_memory_usage()
local b = collectgarbage("count") * 1024
return b
end
`
The text was updated successfully, but these errors were encountered: