Hi all
We faced the memory leak probleam when we migrate our
socket.io from http to https. The memory slowly growing up and at some
point, CPU suddenly goes to 99% without responsive and finally
coredumped by abort().
I tried to shutdown all the connections by
using iptables, and find that the js heap memory did going down, but
the whole process memory(get from ps aux) seems not decreased a lot.
Here is the memroy situation after i shutdown 10000 TCP ESTABLISHED connections:
------------------------------
process memory consume:
miles 31370 15.3 0.7 973188
371732 pts/7 Sl 22:35 7:08 ./bin/node --trace-gc --trace-gc-verbose --expose_gc server.js
js gc log:
[31370] 2875093 ms: Mark-sweep 9.3 (54.0) -> 9.3 (54.0) MB, 11 ms [gc extension] [GC in old space requested].
----------------------------
1.
This maybe because the process does not give memory back to OS for some
kind of user space memroy alloc policy or there's hole in the page
2. It's a normal memory leak from process heap(allloced by new/malloc)
Does someone have good ideas to handle this situation?
Thanks.