Skip to content
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

node 18.13 potential memory leak #46413

Open
francois-gsk opened this issue Jan 30, 2023 · 7 comments
Open

node 18.13 potential memory leak #46413

francois-gsk opened this issue Jan 30, 2023 · 7 comments

Comments

@francois-gsk
Copy link

Version

18.13

Platform

linux/amd64

Subsystem

docker linux/amd64 alpine 3.17

What steps will reproduce the bug?

I only upgrade from 18.2 to 18.3

How often does it reproduce? Is there a required condition?

No specific condition

What is the expected behavior?

when I rolled back to node:18.12:

Screenshot 2023-01-30 at 07 17 23

What do you see instead?

Memory stats since the upgrade to node:18.13:

memleak

Additional information

Code base very huge, not possible to exactly know where is the leak, we rolled back ASAP because our prod env was crashing.

I posted also an issue on the node docker github repo.

@marco-ippolito
Copy link
Member

marco-ippolito commented Jan 30, 2023

I think it's impossible to find where the memory is leaking without an example of what you are doing in your code

@RoyMusthang
Copy link

it would be good if you gave the code you used to do this test, without it there is no way to replicate and locate the error

@ephys
Copy link

ephys commented Jan 30, 2023

We'll try to produce a minimum reproducible example as soon as we can :)

@jamesdiacono
Copy link

Could this be related to #46435?

@francois-gsk
Copy link
Author

Could this be related to #46435?

Yes, one of the (few) task performed on a minute basis is a fetch.

@ephys
Copy link

ephys commented Feb 2, 2023

I agree, it's very likely that the culprit was fetch. Most elements in my heap snapshots that are not going away are fetch related, and the issue seems to only be present in the couple of endpoints that use undici's fetch

@sirpy
Copy link

sirpy commented Jun 1, 2023

I have similar issue, didnt verify it is from >18.12 but when i upgraded to node 18 from node 16
i've started seeing memory leaks on our heroku node.
when i've upgraded to node 20 or downgraded to node 16 issue was solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@sirpy @ephys @marco-ippolito @francois-gsk @RoyMusthang @jamesdiacono and others