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

Potential memory leak #231

Open
dcurletti opened this issue Jan 3, 2020 · 2 comments
Open

Potential memory leak #231

dcurletti opened this issue Jan 3, 2020 · 2 comments

Comments

@dcurletti
Copy link

Has anyone seen a heap dump similar to the image below? Not yet certain its related to this package, but it seems like our exception logs are causing a large number of other objects to be held in memory.

image

@yinzara
Copy link
Collaborator

yinzara commented Mar 1, 2020

I'm a bit confused. Aren't you saying that if the GC ran, it would clear all the objects out of memory? If that's the case wouldn't that imply there isn't a leak and just that you have enough available memory in your system that a GC isn't running automatically and when it would the leak would be gone?

@yinzara
Copy link
Collaborator

yinzara commented Mar 1, 2020

Could you also post your express-winston (and winston if applicable) configuration?

If you're using a "msg" option that is a function that returns a string with mustache interpolations then the app can grow in memory usage extremely quickly as it has to compile the template with every request.

https://github.com/bithavoc/express-winston/blob/master/index.js#L160

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

2 participants