-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
allow set directory for heapsnapshot #39493
Comments
looks like a valid requirement to me! |
I would like to pick this up. Can you please assign this to me? |
@himadriganguly - no need of assignment, the above note is sufficient. go ahead! |
Ok. Thank you. |
Is this possible already somehow? |
Hi,
and
works for us, but I guess the same override as with --cpu-prof-dir and others should be possible. |
If I run node with next flags: node --heapsnapshot-near-heap-limit=2 --heapsnapshot-signal=SIGUSR2 --diagnostic-dir=/diags concurrent.mjs and try to send a SIGUSR2 signal to a running process I'll notice that .heapsnapshot file will be generated in working directory and --diagnostic-dir flag will be ignored. |
Do you have the |
@bnoordhuis I think their comment is about the heapsnapshot functionality built into node core versus the external module? |
If you load node-heapdump, it overrides node's own SIGUSR2 handler. You'll get snapshots but not in the directory you specified. |
@bnoordhuis got it thanks. |
Original feature request has been implemented and no follow-up from @sergeyampo so I'm going to go ahead and close this as done. |
I'm also seeing this behavior. Specifically the handler for the signal does not use the diagnostic directory. Looking at the code, Lines 1830 to 1842 in 38e6ac7
but Lines 456 to 457 in 38e6ac7
|
In case anyone else finds this issue and wonders about a solution for @thefloweringash's message: There is a pending pull request by @MrJithil 💪🏼 |
Is your feature request related to a problem? Please describe.
Please describe the problem you are trying to solve.
the --heapsnapshot-signal and --heap snapshot-near-heap-limit is very handy when dealing with memory issues.
if we can add a flag to allow setting the directory where the heap snapshop is written to, it would give a lot of flexibility.
Describe the solution you'd like
Please describe the desired behavior.
allow set the directory where heap snapshot is written to
Describe alternatives you've considered
Please describe alternative solutions or features you have considered.
The text was updated successfully, but these errors were encountered: