pm2 agent for keymetrics is dead
What's going wrong?
- pm2 agent for keymetrics not online after 30-40 minutes , helps only 'pm2 link' or pm2 kill, and pm2 start
How could we reproduce this issue?
node v8.9.4 pm2 2.9.3 ubuntu 16.04 I have 2 diffrent servers, both have same behavior
i don't know, can it influence, but i've set dump.pm2 as immutable (+i flag)
Supporting information
Please run the following command (available on PM2 >= 2.6)
$ pm2 report
Module activated ┌──────────────────┬─────────┬────────────┬────────┬─────────┬─────┬─────────────┬──────┐ │ Module │ version │ target PID │ status │ restart │ cpu │ memory │ user │ ├──────────────────┼─────────┼────────────┼────────┼─────────┼─────┼─────────────┼──────┤ │ pm2-logrotate │ 2.4.0 │ N/A │ online │ 0 │ 0% │ 49.656 MB │ daj │ │ pm2-server-monit │ 2.5.3 │ N/A │ online │ 0 │ 0% │ 44.234 MB │ daj │ └──────────────────┴─────────┴────────────┴────────┴─────────┴─────┴─────────────┴──────┘
--- Daemon logs --------------------------------------------
/home/daj/.pm2/pm2.log last 20 lines:
PM2 | at FSWatcher.NodeFsHandler._watchWithNodeFs (/usr/lib/node_modules/pm2/node_modules/chokidar/lib/nodefs-handler.js:228:14)
PM2 | at FSWatcher.NodeFsHandler._handleDir (/usr/lib/node_modules/pm2/node_modules/chokidar/lib/nodefs-handler.js:407:19)
PM2 | at FSWatcher.
2.9.3 daj@datamachine:~/projects/datamachine$ pm2 report
--- PM2 REPORT (Wed Feb 07 2018 09:22:57 GMT+0000 (UTC)) ----------------------
--- Daemon ------------------------------------------------- pm2d version : 2.9.3 node version : 8.9.4 node path : /usr/local/bin/pm2 argv : /usr/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js argv0 : node user : daj uid : 1000 gid : 1000 uptime : 10min
--- CLI ---------------------------------------------------- local pm2 : 2.9.3 node version : 8.9.4 node path : /usr/local/bin/pm2 argv : /usr/bin/node,/usr/local/bin/pm2,report argv0 : node user : daj uid : 1000 gid : 1000
--- System info -------------------------------------------- arch : x64 platform : linux type : Linux cpus : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz cpus nb : 2 freemem : 773894144 totalmem : 2097299456 home : /home/daj
--- PM2 list ----------------------------------------------- ┌─────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬────────────┬──────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │ ├─────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼────────────┼──────┼──────────┤ │ datamachine │ 2 │ fork │ 18966 │ online │ 0 │ 10m │ 3% │ 102.5 MB │ daj │ enabled │ └─────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴────────────┴──────┴──────────┘ Module activated ┌──────────────────┬─────────┬────────────┬────────┬─────────┬─────┬─────────────┬──────┐ │ Module │ version │ target PID │ status │ restart │ cpu │ memory │ user │ ├──────────────────┼─────────┼────────────┼────────┼─────────┼─────┼─────────────┼──────┤ │ pm2-logrotate │ 2.4.0 │ N/A │ online │ 0 │ 0% │ 39.520 MB │ daj │ │ pm2-server-monit │ 2.5.3 │ N/A │ online │ 0 │ 1% │ 42.520 MB │ daj │ └──────────────────┴─────────┴────────────┴────────┴─────────┴─────┴─────────────┴──────┘
--- Daemon logs -------------------------------------------- ┌─────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬────────────┬──────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │ ├─────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼────────────┼──────┼──────────┤ │ datamachine │ 2 │ fork │ 18966 │ online │ 0 │ 10m │ 0% │ 102.5 MB │ daj │ enabled │ └─────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴────────────┴──────┴──────────┘ Module activated ┌──────────────────┬─────────┬────────────┬────────┬─────────┬─────┬─────────────┬──────┐ │ Module │ version │ target PID │ status │ restart │ cpu │ memory │ user │ ├──────────────────┼─────────┼────────────┼────────┼─────────┼─────┼─────────────┼──────┤ │ pm2-logrotate │ 2.4.0 │ N/A │ online │ 0 │ 0% │ 39.520 MB │ daj │ │ pm2-server-monit │ 2.5.3 │ N/A │ online │ 0 │ 0% │ 42.520 MB │ daj │ └──────────────────┴─────────┴────────────┴────────┴─────────┴─────┴─────────────┴──────┘
As i explored, it occures due to immutable flag (+i) to dump.pm2
upgrade pm2 to latest version it fixes issues with pm2-runtime