-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Closed
Description
Is your feature request related to a problem? Please describe.
Existing ways to collect a (full) heap dump are not production-friendly. The proposed flag can be enabled for production application in order to help with post-mortem memory leak diagnostics.
Describe the solution you'd like
Add a new new flag (say, --heapsnaphot-on-outofmemory) that would enable collection of a heap dump before terminating node process in the out of memory scenario.
Additional context. Such option (-XX:+HeapDumpOnOutOfMemoryError) is available in JVM (e.g. in OpenJDK) for a long time and many developers use it.
Describe alternatives you've considered
I can see the following alternatives:
--heapsnapshot-signal=signal- this option assumes a signal that is sent to node process externally. Thus, it's not possible to trigger it on out-of-memory.heapdumpuser-land module - quite similar to sending a signal, yet it's triggered programmatically inside the node application.node-oom-heapdumpuser-land module - seems to implement the proposed feature, but I believe that such feature should belong to the core in order to be well-tested.--heap-prof- this option enables V8 sampling heap profiler which reports are not quite the same as a full heap dump (yet, they're certainly valuable for users).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels