Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Heap Usage mean in PM2

What does Heap Usage mean in the "Custom Metrics" window when running pm2 monit?

The value for my server gets dangerously close to 100%.

enter image description here

like image 884
scottc11 Avatar asked Dec 28 '19 16:12

scottc11


1 Answers

The heap is a memory used by programming languages to store global variables. By default, all global variable are stored in heap memory space.

It`is maybe because of your programs variable.

you can reset it after it exceeded the limit or force pm2 do it for you automatically.

pm2 start api.js --max-memory-restart 300M

like image 198
Amir Mohammad Pirshah Avatar answered Nov 15 '22 22:11

Amir Mohammad Pirshah