-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.
Description
- Version: 6.8.0, 7.0.0
- Platform: Ubuntu 16.04 (Linux patrickd 4.4.0-38-generic Fix for path.resolve containing relative path to another drive in windows #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux)
- Subsystem: https
I experience a memory leak when doing https requests to a host that resets the connection.
Reproduce by
- starting
node econnreset.js
econnreset.js.txt - start
node leak.js
leak.js.txt - Observe process memory
For me it goes up to 600MB with 10000 requests - and stays that way.
Heapdump is small
- install node-heapdump (
npm install heapdump) - comment in the
require('heapdump') - run
node econnreset.jsandnode leak.js - when it's done with the requests (no more CPU usage) execute
kill -USR2 $pid.
The resulting heapdump from a process with 600MB is only 100MB large.
Manual GC call has no effect
- comment in
global.gc(); - start
node econnreset.jsandnode leak.js --expose-gc - when it's done with the requests (no more CPU usage) it will execute the GC every second but the memory usage doesn't change.
Am I using https.request() wrong or is this an internal problem?
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.