-
Notifications
You must be signed in to change notification settings - Fork 64
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
how to trigger the 'leak' event? #14
Comments
I'm seeing the same thing. Stats event fires without issue and even though my usage_trend is like..22 and memory usage has grown over 5+ GCs, the leak event is never fired. |
@xosuperpig can you provide an example to generate a leak? |
I have also run all of example, but the "leak" event could not triggered...
thank you very mach! |
@droidenator , did your problem keep on?how solve it? |
this is a Promise leak example in node 4.2 lts |
I'm running node on a Mac Book Pro. I notice that garbage collection is sometimes running in pairs quite close together, and the second one reclaims a little bit of memory that the first did not. As a result, my process never fulfils the "5 increases in a row" condition, despite the overall memory usage increasing! Example log:
The leak is detected fine when I use I wonder if we could use a different condition for detection. Perhaps something like "over threshold T after 5 consecutive GCs" where T can be set manually, or perhaps chosen as "10 x the memory usage one minute after startup". Notably the problematic gc pairs do not occur when I reduce the speed at which the leak grows, so perhaps I am just being too aggressive/impatient with my tests. |
In the meantime, you can fake a 'leak' event like this...
|
hi @joeytwiddle, i'll delve into this on monday... ;) |
@xosuperpig I modified the leaking http server in the example a bit and ran the http server for a while then memwatch did emit several |
I've run all of the example, but no one could trigger this event...
The text was updated successfully, but these errors were encountered: