fairyqb opened a new issue, #11519:
URL: https://github.com/apache/apisix/issues/11519
### Current Behavior
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)
`
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.
### Expected Behavior
why?
### Error Logs
none
### Steps to Reproduce
none
### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
aspsix all version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]