Skip to content

Memory leak due to process.fork()? #15651

Closed
@Reggino

Description

@Reggino
  • 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:

node/lib/net.js

Line 1665 in 20259f9

Server.prototype._setupWorker = function(socketList) {

How, where and when should this socketList be removed from the _workers-array?

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.confirmed-bugIssues with confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions