Seemingly meaningless memory warning indicator on pm2 monit - No documentation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- cli, observability-sre
Research direction
Start by reproducing the report with stayAlive.js and stayAlive2.js using the listed pm2 start and pm2 monit commands. Review the resulting Mem indicator and document what the warning means, when it is valid, and how the reported behavior should be interpreted.
Written by the indexing model from the issue text.
Description
What's going wrong?
I have a pm2 running two apps on my raspberry pi and the memory displays on pm2 monit are always yellow.
This is in the process list - the Mem property.
I have tested for a leak and there is not one. - The memory goes up but that is only because GC is not doing a full sweep. Ive had it running for the last 24 hours to monitor it and the memory goes up for an hour or so at the start while buffers are filling etc then doesn't move.
I've then made a very simple example and reproduced on my windows laptop.
Could you please tell me what these warnings mean and if they are valid.
How could we reproduce this issue?
I have reproduced this on my windows machine by making two js files with the same contents, stayAlive.js and stayAlive2.js.
setInterval(() => {
// do nothing
}, 1000);
Then start both apps using
pm2 start stayAlive.js
pm2 start stayAlive2.js
Then run monit
pm2 mont
Supporting information
$ pm2 report
Report
--- PM2 report ----------------------------------------------------------------
Date : Mon Sep 20 2021 17:58:08 GMT+0100 (British Summer Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.1.0
node version : 14.17.6
node path : not found
argv : C:\Program Files\nodejs\node.exe,C:\Users\__windows_user__\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0 : node
user : undefined
uid : N/A
gid : N/A
uptime : 7min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.1.0
node version : 14.17.6
node path : not found
argv : C:\Program Files\nodejs\node.exe,C:\Users\__windows_user__\AppData\Roaming\npm\node_modules\pm2\bin\pm2,report
argv0 : node
user : __windows_user__
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : win32
type : Windows_NT
cpus : AMD A12-9720P RADEON R7, 12 COMPUTE CORES 4C+8G
cpus nb : 4
freemem : 2451279872
totalmem : 7935598592
home : C:\Users\__windows_user__
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ stayAlive │ default │ 0.1.0 │ fork │ 14208 │ 4m │ 0 │ online │ 0% │ 26.5mb │ __windows_user__ │ disabled │
│ 1 │ stayAlive2 │ default │ 0.1.0 │ fork │ 7368 │ 3m │ 0 │ online │ 0% │ 26.5mb │ __windows_user__ │ disabled │
└─────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
C:\Users\__windows_user__\.pm2\pm2.log last 20 lines:
PM2 | 2021-09-20T17:50:47: PM2 log: ===============================================================================
PM2 | 2021-09-20T17:50:47: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2 | 2021-09-20T17:50:47: PM2 log: Time : Mon Sep 20 2021 17:50:47 GMT+0100 (British Summer Time)
PM2 | 2021-09-20T17:50:47: PM2 log: PM2 version : 5.1.0
PM2 | 2021-09-20T17:50:47: PM2 log: Node.js version : 14.17.6
PM2 | 2021-09-20T17:50:47: PM2 log: Current arch : x64
PM2 | 2021-09-20T17:50:47: PM2 log: PM2 home : C:\Users\__windows_user__\.pm2
PM2 | 2021-09-20T17:50:47: PM2 log: PM2 PID file : C:\Users\__windows_user__\.pm2\pm2.pid
PM2 | 2021-09-20T17:50:47: PM2 log: RPC socket file : \\.\pipe\rpc.sock
PM2 | 2021-09-20T17:50:47: PM2 log: BUS socket file : \\.\pipe\pub.sock
PM2 | 2021-09-20T17:50:47: PM2 log: Application log path : C:\Users\__windows_user__\.pm2\logs
PM2 | 2021-09-20T17:50:47: PM2 log: Worker Interval : 30000
PM2 | 2021-09-20T17:50:47: PM2 log: Process dump file : C:\Users\__windows_user__\.pm2\dump.pm2
PM2 | 2021-09-20T17:50:47: PM2 log: Concurrent actions : 2
PM2 | 2021-09-20T17:50:47: PM2 log: SIGTERM timeout : 1600
PM2 | 2021-09-20T17:50:47: PM2 log: ===============================================================================
PM2 | 2021-09-20T17:53:28: PM2 log: App [stayAlive:0] starting in -fork mode-
PM2 | 2021-09-20T17:53:28: PM2 log: App [stayAlive:0] online
PM2 | 2021-09-20T17:54:22: PM2 log: App [stayAlive2:1] starting in -fork mode-
PM2 | 2021-09-20T17:54:22: PM2 log: App [stayAlive2:1] online
Please copy/paste the above report in your issue on https://github.com/Unitech/pm2/issues
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Unitech/pm2
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Errors Open
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100