You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,16 @@ Also comes with prebuilt binaries (hosted on Github releases), thanks to Stuart
12
12
From 3.1.0, prebuilt binaries are only shipped for Node.js 16.x and upwards.
13
13
From 3.2.3, prebuilt binaries are only shipped for Node.js 18.x and upwards.
14
14
15
+
## Node 22.x
16
+
Since node 22.x, there is a new CLI flag for generating heapdumps. This one is supplied by V8 (not Node.js) and is more reliant and efficient in creating the heapdumps than Node.js' `--heapsnapshot-near-heap-limit`.
17
+
More information: https://github.com/nodejs/node/issues/50711#issuecomment-2149559816
18
+
19
+
```
20
+
node --heap-snapshot-on-oom index.js
21
+
```
22
+
Since node 22.x we had issues with no heapdumps being created in production sometimes (via `--heapsnapshot-near-heap-limit`), which did work when using V8's `--heap-snapshot-on-oom`.
23
+
The only disadvantage i encountered is that the filename of the heapdump file does not include a process ID, just the timestamp.
24
+
15
25
## Node.js 14.18.x
16
26
https://github.com/nodejs/node/pull/33010 landed in Node.js 14.18.0, which makes this module no longer needed for heapdumps on out of memory.
17
27
One can use the `--heapsnapshot-near-heap-limit` Node.js CLI option as an alternative.
0 commit comments