Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
Ineffective mark-compacts near heap limit Allocation failed error when building next.js app

I have a next.js app running inside a docker container in a EC2 instance. When I run docker-compose up this will trigger the next.js app to be built. Now it is some time I am getting this error:

info  - Creating an optimized production build ..
client_1  | <--- Last few GCs --->
client_1  | 
client_1  | [25:0x55a9ab94f280]    62318 ms: Scavenge (reduce) 957.4 (969.5) -> 956.4 (970.5) MB, 1.7 / 0.0 ms  (average mu = 0.081, current mu = 0.045) allocation failure 
client_1  | [25:0x55a9ab94f280]    62328 ms: Scavenge (reduce) 957.8 (969.5) -> 956.8 (970.5) MB, 1.6 / 0.0 ms  (average mu = 0.081, current mu = 0.045) allocation failure 
client_1  | [25:0x55a9ab94f280]    62338 ms: Scavenge (reduce) 958.1 (969.5) -> 957.1 (970.5) MB, 1.6 / 0.0 ms  (average mu = 0.081, current mu = 0.045) allocation failure 
client_1  | 
client_1  | 
client_1  | <--- JS stacktrace --->
client_1  | 
client_1  | FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
client_1  | Aborted (core dumped)

I know this is a memory problem with node, I am running v14.19 in EC2 and 14.16 inside the container. Also if I run

node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'

as suggested in another topic, I get 994, which I don't know if it is a good value.

Any suggestion on what I can do to solve it please?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda