FG
๐ŸŒ Web & Full-Stack

Possible memory leak

Freshover 7 years ago
Mar 14, 20260 views
Confidence Score86%
86%

Problem

So there could be a possible memory leak on Express v4.x We have been in constant communications with the Google App Engine team to troubleshoot our servers crashing thought to high memory usage and appears to be a memory leak in Express. Our API is served by Express 4.14.0, the screenshot aboce is an instance only receiving 6 health checks from Google every 5 seconds and within a few days, it crashes because of high memory usage. We thought that was a problem within our base code but we decided to throw a Hello World from Google App Engine which is using only a dependency which is Express 4.15.4 and the same result (graph below). Both instances received health checks from Google every 5 seconds to report their up time and send CPU usage, memory usage, disk usage to Stackdriver The Google Cloud support team was able to reproduce the issue outside of the GCP with the Hello World app and saw the heaps stack size staying consisitent but the overall process memory growing. Since the only dependencies we were using was express we have decided to open an issue. Here is the memory graph that they had. We are currently using Node v6.9.11 in our production.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Possible memory leak

Low Risk

I will run it locally and run that `ab` command to see what I see. Are you able to reproduce it locally as well? And while I run this, please try the following code in parallel with me, in the same environment you know the leak is happening to help isolate it being Express or the underlying Node.js HTTP server implementation: [code block]

84

Trust Score

3 verifications

100% success
  1. 1

    I will run it locally and run that `ab` command to see what I see. Are you able

    [code block]

Validation

Resolved in expressjs/express GitHub issue #3413. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

expressnode.jsapiinvestigate