Closed lzle closed 1 year ago
@lzle have you tried force gc? after pop, collectgarbage("collect")
yes, call
collectgarbage("collect")
will release the memory, but I don't know whether the force gc will cause other problems, such asstop the world
, which will cause the processing to pause. Is there any other better way? and why the automatic garbage collection mechanism did not reclaim memory?thanks!
@lzle it's a normal GC issue, Lua need the memory reach 2x memory size to start GC. you could investigate how Lua GC works.
When max_buffering is set too large, the memory will not be released. Examples are as follows: After requesting access, it is found that the nginx process will always occupy 10GB of memory and will not release it until the process ends. Theoretically, the memory should drop after the access, because the table is already empty. can you explain it?thanks!