-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Make --heap-snapshot-on-oom use --diagnostic-dir #56247
Comments
That is not going to happen, the limit only means that Node.js will stop generating more snapshots beyond this number. --heap-snapshot-on-oom is not implemented by Node.js, I am not sure where it comes from? |
V8, according to #50711 (comment) 🙂 node/deps/v8/src/profiler/heap-profiler.h Lines 64 to 65 in 6012a4e
which is node/deps/v8/src/profiler/heap-profiler.cc Lines 169 to 188 in 6012a4e
|
Oh yeah I forgot about my own comment 😂 I don't think there is much Node.js can do for affecting |
Oh, ok. Then I misunderstood how it works. I thought that this was the number of snapshots it will keep and then it will keep replacing. In this case - potentially - I am about to get close to the max heap, but won't OOM, it will create one snapshot and any future close to max won't do the job. I mean... technically this close to max heap can be treated as a problem for OOM verification as well, but it MAY come from different time than actual OOM. But maybe its nitpicking and in most cases it will give me what I need.
I see you got the answer, I wasn't aware that its actually coming from V8, my bad 😄 And totally agree, I would raise an issue there, although first I need to make sure that there wasn't anything in the documentation of V8 😄 (but based on the code, I dont think so) This one can be closed 😄 |
Oh. I used wrong account, thats why I couldn't close. Dummy. |
What is the problem this feature will solve?
I was looking into --heap-snapshot-on-oom parameter and right now it is not respecting the --diagnostic-dir parameter like --heapsnapshot-near-heap-limit. We have a setup which requires us to place dumps into a folder which is a s3 mount. And it would be much easier to be able to set the directory straight away, rather than copy afterwards.
What is the feature you are proposing to solve the problem?
Can we make so, that --heap-snapshot-on-oom will use diagnostic-dir as well?
While on that topic, would it be possible to change name of those heapdumps via parameter?
What alternatives have you considered?
Right now I am using --heapsnapshot-near-heap-limit=1 instead, but if possible I would prefer to use --heap-snapshot-on-oom, to make sure that only one snapshot will be generated (I am afraid of a case where files will be deleted and created again while using near heap limit 1)
The text was updated successfully, but these errors were encountered: