FG
๐Ÿ’ป Software๐ŸŒ Web & Full-Stack

Memory Leak

Freshalmost 8 years ago
Mar 14, 20260 views
Confidence Score85%
85%

Problem

We've been experiencing a memory leak in our node servers. Over the course of a day or so the memory in our servers started to fill until we got an alert and had to restart the app. We added new relic to check the node VM memory: Upon debugging and testing we've come to the conclusion that the leak could be in express. We did some test on a clean express server, printing the heap before and after a lot of request and we see the memory increasing but never going back to the initial value. We tested on various versions of Node and two versions of express (4.16.2 and 4.14.1) and we had the same results. I'll add the last test setup so you can reproduce it. Tested on OSX 10.12.6 Node 7.6.0 Express 4.16.1 Code [code block] run with `node --expose-gc server.js` autocannon command `autocannon -a100000 -c5 http://localhost:9000/` Results: <img width="745" alt="screen shot 2018-02-05 at 17 54 44" src="https://user-images.githubusercontent.com/1228656/35828372-01003654-0a9e-11e8-95ca-899450cf9f20.png"> This is just one of the many test we made, all with similar results

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Memory Leak

Low Risk

Thanks for the report, we will look into this ASAP. Do you think this is the same as #3413 or different?

84

Trust Score

1 verification

100% success
  1. 1

    Thanks for the report, we will look into this ASAP. Do you think this is the sam

    Thanks for the report, we will look into this ASAP. Do you think this is the same as #3413 or different?

Validation

Resolved in expressjs/express GitHub issue #3552. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

expressnode.jsapiawaiting-more-info