Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#63,952 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
javascript, node.js

Línea de trabajo

El issue no nombra archivos fuente ni pruebas. Empieza revisando el manejo de --heap-snapshot-on-oom de Node y process.memoryUsage(), y luego determina cómo se representan los límites del heap de V8, Buffer, la memoria externa y RSS; para darlo por terminado harían falta un diseño decidido, una implementación y cobertura de pruebas para el comportamiento propuesto de --max-memory o --max-rss.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
122k
Forks
37.4k
Merge medio
4 d 2 h
PR fusionados (30 d)
277

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nodejs/node

Todos los issues de nodejs/node

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.