'AWS Node.js Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Facing issue: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 59901 max locked memory (kbytes, -l) 65536 max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 59901 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
--max_old_space_size is 10GB
We have this configuration of aws ec2 but once 1gb heap memory size our system not working all the process goes to down and need to server restart. I am using PM2 for process management. There is no any exceptions in the code. Please help me to find root cause of this issue.
Solution 1:[1]
In my case, I added the force command for the build of my react js app in the docker config like this one:
RUN npm run build --force
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Zekarias Taye Hirpo |
