- Version: v8.5.0
- Platform: Linux
I am experiencing memory leakage in an app that usesprocess.fork() a lot. These child processes get sent messages via process.send() with a sendHandle and are terminated later on.
I did run into issues with memory management here. Some heap dumps show that even after the child-processes exited, the ChildProcess-instances are retained in the master process. I learned that using subprocess.disconnect() partly fixes that issue, but one more retainer can be found here:
|
Server.prototype._setupWorker = function(socketList) { |
How, where and when should this socketList be removed from the _workers-array?
I am experiencing memory leakage in an app that uses
process.fork()a lot. These child processes get sent messages viaprocess.send()with asendHandleand are terminated later on.I did run into issues with memory management here. Some heap dumps show that even after the child-processes exited, the
ChildProcess-instances are retained in the master process. I learned that usingsubprocess.disconnect()partly fixes that issue, but one more retainer can be found here:node/lib/net.js
Line 1665 in 20259f9
How, where and when should this
socketListbe removed from the_workers-array?