-
-
Notifications
You must be signed in to change notification settings - Fork 25
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 16 Memory leak #23
Comments
Since the memory leak occurs after upgrading Node.js, it's most likely a Node.js bug. |
Would you be able to try this branch and see if it improves the situation? https://github.com/sindresorhus/import-fresh/tree/memory-leak |
Yea it could very be, I wasn't able to determine it.
Sure, I'll give it a shot and would update, thanks for the fast response 🙏 |
So i gave it a shot, I got same results sadly, While inspecting the memory profiler I can see that the modules are kept in memory and not garbage collected due to some reference pointing them which I didn't quite understand, altho the This acts completely different in Node 14, where the module is being properly garbage collected and it only keeps 1 reference. |
So I've done a bit more tracing and it seems to be related to this commit. For some reason, So it most definitely relates to node 👌 |
It seems it was already reported as Node issue, once it resolved I think it should work as expected once again |
We are currently using (and loving) this package over our current production applications while we using
Node14
.As part of our tech upgrades, we are moving towards
Node16
and while we tested our codebase with the new node version, we discovered while monitoring to pods that we huge memo leak.I tried reproducing the issue using the
heapdump
script of this package and I got this following results:-- Node 14 --
require
importFresh
-- Node 16 --
require
importFresh
It seems that there is a notable difference between two, I might have missed something tho has anybody else had experienced that?
Appreciated, cheers 🎉
The text was updated successfully, but these errors were encountered: