Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Heap snapshot on OOM due to buffers/external memory/large arrays rather than V8 heap

Aperta
#63,952 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
javascript, node.js

Direzione di ricerca

L’issue non indica file sorgente né test. Inizia esaminando la gestione di --heap-snapshot-on-oom e process.memoryUsage() in Node, quindi determina come sono rappresentati i limiti dell’heap V8, di Buffer, della memoria esterna e di RSS; per considerare il lavoro completato servirebbero un design definito, un’implementazione e una copertura dei test per il comportamento proposto di --max-memory o --max-rss.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature request
What is the problem this feature will solve?

I have a server that's been OOMing when it hits the Docker memory limit I set of 2GB. I had set --max-old-space-size=432 --max-semi-space-size=16 --heap-snapshot-on-oom but Node isn't logging OOM or creating a heap snapshot so I think the issue is too much buffer allocation.

It sure sucks that there's no surefire way to get diagnostic information if too many buffers get allocated.

What is the feature you are proposing to solve the problem?

I'm not 100% sure if this is possible but a --max-memory or --max-rss flag that would set a limit on the resident set size would be really great. If V8 heap, buffer, or C++ external object allocation would push the resident set size over this limit, Node would make a heap snapshot if --heap-snapshot-on-oom is set, and then exit.

What alternatives have you considered?

I will have to try polling process.memoryUsage() and taking my own heap dump if the memory is getting too large, but I think sudden buffer allocation is OOMing after only a few seconds so I'm not sure it will even work.

Lingua principale
JavaScript
Stelle
122k
Fork
37.4k
Merge medio
4g 2h
PR unite (30g)
277

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/node

Tutte le issue di nodejs/node

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.