-
Notifications
You must be signed in to change notification settings - Fork 293
Understanding Memory Allocation + Debug memory Leak #4200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @nodejs/v8 |
you are right, the heap usage is not correctly reflected in the graph. which tool is that?
it is hard. but this is a rough sketch of what you can do:
if you want to take that path and have questions on any steps let me know! |
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. |
Just change the node version to 21.7.3 it will resolve your issue.Thanks me later .....! |
This issue didn't get a response to @gireeshpunathil's suggestion, and would've stale closed. If you disagree with this, please reopen :-) |
Details
We have migrated one of our top nodejs application from pm2 to containers + kubernetes.
This migration gave us way more information about our running code and we have fixe multiple memory leak related to dependencies.
After multiple iteration, we successfully have the heap quite stabilized but we seems to still having a leak.

A chart is worth a thousand words:
As you can see, the heap sounds normal, but the external memory have a good leak representation.
Node is running with
--max-heap-size=768
optionWhat I dont understand is this error:
If I understand the gc trace correctly, the heap is at 716MB, but why not on the graph ?
Also, how to find a leak on the external memory ?
Node.js version
v20.3.1
Example code
No response
Operating system
Linux 5.10.178-162.673.amzn2.x86_64 #1 SMP Mon Apr 24 23:34:06 UTC 2023 x86_64 GNU/Linux
Scope
runtime
Module and version
Not applicable.
The text was updated successfully, but these errors were encountered: