Possible memory leak
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
Solution: Possible memory leak
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]
Trust Score
3 verifications
- 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
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep