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 is making the app crash #2

Open
magmahindenburg opened this issue Nov 12, 2017 · 6 comments
Open

Memory leak is making the app crash #2

magmahindenburg opened this issue Nov 12, 2017 · 6 comments

Comments

@magmahindenburg
Copy link
Contributor

If it's running for a while, it will eventually crash due to a memory leak somewhere. It seems that the garbage collector can't delete things.

@robinkanters
Copy link

Do you have any logs and/or stack traces? Memory leaks are notoriously hard to identify, so every bit of information helps here.

@chrulri
Copy link

chrulri commented Nov 12, 2017

Does it crash with no usage at all or does it only crash if a certain amount of traffic or traffic+time has hit the site?

@magmahindenburg
Copy link
Contributor Author

It crashes after certain amount of requests are made to it, so the more people are visiting the site, the faster it crashes.

@kx9x
Copy link

kx9x commented Nov 13, 2017

kx9x@67afb81 might help anyone who wants to generate periodic heap snapshots.

I took this from https://www.alexkras.com/simple-guide-to-finding-a-javascript-memory-leak-in-node-js/

I couldn't repro a situation that causes much memory growth. Maybe someone else will have some luck

@chrulri
Copy link

chrulri commented Nov 13, 2017

Also can't reproduce the memory issue in my virtual machine. I added memwatch-next to watch the GC stats and they seem fine to me and even after 100k requests there is no sign of increasing memory load.

{ num_full_gc: 684,
num_inc_gc: 11984,
heap_compactions: 684,
usage_trend: 8099.7,
estimated_base: 52334917,
current_base: 51869616,
min: 14364704,
max: 83116464 }

Commit for memwatch-next: https://github.com/chrulri/Blockexplorer/commit/4f23873f1635e3b3301bad0a402c2801e8ec96d5
Commit for Jmeter testplan: https://github.com/chrulri/Blockexplorer/commit/4a7437dd44e22c00a8784acbe087e5f2307b340b

@oojr
Copy link

oojr commented Nov 13, 2017

@magmahindenburg you should look into a library that helps with caching, you might need to incorporate redis or sql to reduce requests https://github.com/facebook/dataloader

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

5 participants