-
Notifications
You must be signed in to change notification settings - Fork 124
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
Doesn't support 1GB+ heapdumps #77
Comments
@FexileTV Would it be possible for you to share the 1.9GB snapshot? Or, as an alternative, could you get a smaller snapshot that still reproduces the problem? |
The snapshot was taken from an production environment so it contains sensitive information which I'm not able to share. The app uses .5GB under normal load (no memory leak) and when the rare leak does occur it instantly jumps to 3x the memory usage. So I'm unable to capture a smaller size heapsnapshot |
Without a repro of the issue, it will be challenging to identify the root cause and to validate the fix. The execution appears to stall at the dominator tree construction stage (it's not a crash, otherwise the JS runtime should exit). I may implement a CLI option to bypass this particular step later. This could allow MemLab to work without the retained size data for each object within the heap. Consequently, it won't rank the memory leaks based on their potential size. |
The current JavaScript heap parser is not very good at processing very large heap snapshots, since memory leaks could often be captured by much smaller snapshots in most of use cases. If your JavaScript heap takes 500MB under normal load, a potential optimization is to encode the memory-consuming part into I guess your JavaScript heap is densely populated with objects, perhaps more so than usual. Consider trying the following steps to identify memory issues:
node packages/memlab/bin/memlab analyze object-fanout --snapshot <PATH/TO/YOUR/SNAPSHOT>
node packages/memlab/bin/memlab view-heap --snapshot <PATH/TO/YOUR/SNAPSHOT> --node-id <HEAP-OBJECT-ID> Edit: I'm still having trouble replicating the freeze that occurs while handling big heap snapshots. Every time I try, Node.js just runs out of memory. |
When trying to find a leak in a 1.9G (nodeJS) heapsnapshot, it gets stuck at "calculating dominators and retained size"
It doesn't run out of memory either (I'm giving memlab CLI 12GB of mem, it uses 3.6 max)
Same issue is present in Chrome Dev Tools:
I've tried letting it just sit/run for hours, but I believe its crashing internally and not returning anything
The text was updated successfully, but these errors were encountered: