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

Memory leak #45

Open
Sprit3Dan opened this issue Oct 11, 2018 · 4 comments
Open

Memory leak #45

Sprit3Dan opened this issue Oct 11, 2018 · 4 comments

Comments

@Sprit3Dan
Copy link

Sprit3Dan commented Oct 11, 2018

Memory leak!

Hello!
Not sure if it is done on purpose, and it is by-design, but I encountered a huge memory leak using your library with express.js.

I created a tiny PoC for you to check it out. https://github.com/Sprit3Dan/mem-leak

The way it could be reproduces is to make the callback for the express path asynchronous by adding the async keyword.

Here are the charts for heap used per ~1k queries.

If you add the library:

image

If not:

image

Guess many people could be stuck at this situation, when using you lib.
Hope you find this ticket useful :)

@AndreasMadsen
Copy link
Owner

@Sprit3Dan Thanks you so much. Similar issues have been reported before, but I couldn't get a simple test case.

@AndreasMadsen
Copy link
Owner

@Sprit3Dan Just to be safe, what version of node.js are you using?

@Sprit3Dan
Copy link
Author

@AndreasMadsen, I'm using v8.12.0 LTS

@cspotcode
Copy link
Contributor

I see the memory leak on v8.12.0 but not on v10.11.0. This might be a node bug, considering that async_hooks was a preview feature in node 8.

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

3 participants