You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pm2@4.4.1 is using asynchronous mode to create log folder, which may cause error when the program writing the log file firstly, and pm2 finishing creating the log folder secondly.
--- CLI ----------------------------------------------------
local pm2 : 4.4.1
node version : 12.18.3
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/bin/pm2,report
argv0 : node
user : qsqiu
uid : 1000
gid : 1000
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
cpus nb : 8
freemem : 26491584512
totalmem : 26847076352
home : /home/qsqiu
--- PM2 list -----------------------------------------------
┌─────┬──────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user
│ watching │
├─────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ index │ default │ N/A │ fork │ 1031 │ 3h │ 0 │ online │ 0.2% │ 42.7mb │ qsqiu
│ disabled │
└─────┴──────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
What's going wrong?
pm2@4.4.1 is using asynchronous mode to create log folder, which may cause error when the program writing the log file firstly, and pm2 finishing creating the log folder secondly.
see https://github.com/Unitech/pm2/blob/4.4.1/lib/Common.js#L243, it's using async-mode to create dir, instead of sync-mode.
How could we reproduce this issue?
and run:
and you will get the error:
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Mon Sep 07 2020 15:15:53 GMT+0800 (China Standard Time)
--- Daemon -------------------------------------------------
pm2d version : 4.4.1
node version : 12.18.3
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : qsqiu
uid : 1000
gid : 1000
uptime : 185min
--- CLI ----------------------------------------------------
local pm2 : 4.4.1
node version : 12.18.3
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/bin/pm2,report
argv0 : node
user : qsqiu
uid : 1000
gid : 1000
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
cpus nb : 8
freemem : 26491584512
totalmem : 26847076352
home : /home/qsqiu
--- PM2 list -----------------------------------------------
┌─────┬──────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user
│ watching │
├─────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ index │ default │ N/A │ fork │ 1031 │ 3h │ 0 │ online │ 0.2% │ 42.7mb │ qsqiu
│ disabled │
└─────┴──────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
--- Daemon logs --------------------------------------------
/home/qsqiu/.pm2/pm2.log last 20 lines:
PM2 | 2020-09-07T12:10:45: PM2 log: pid=923 msg=process killed
PM2 | 2020-09-07T12:10:45: PM2 log: PM2 successfully stopped
PM2 | 2020-09-07T12:10:46: PM2 log: ===============================================================================
PM2 | 2020-09-07T12:10:46: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2 | 2020-09-07T12:10:46: PM2 log: Time : Mon Sep 07 2020 12:10:46 GMT+0800 (China Standard Time)
PM2 | 2020-09-07T12:10:46: PM2 log: PM2 version : 4.4.1
PM2 | 2020-09-07T12:10:46: PM2 log: Node.js version : 12.18.3
PM2 | 2020-09-07T12:10:46: PM2 log: Current arch : x64
PM2 | 2020-09-07T12:10:46: PM2 log: PM2 home : /home/qsqiu/.pm2
PM2 | 2020-09-07T12:10:46: PM2 log: PM2 PID file : /home/qsqiu/.pm2/pm2.pid
PM2 | 2020-09-07T12:10:46: PM2 log: RPC socket file : /home/qsqiu/.pm2/rpc.sock
PM2 | 2020-09-07T12:10:46: PM2 log: BUS socket file : /home/qsqiu/.pm2/pub.sock
PM2 | 2020-09-07T12:10:46: PM2 log: Application log path : /home/qsqiu/.pm2/logs
PM2 | 2020-09-07T12:10:46: PM2 log: Worker Interval : 30000
PM2 | 2020-09-07T12:10:46: PM2 log: Process dump file : /home/qsqiu/.pm2/dump.pm2
PM2 | 2020-09-07T12:10:46: PM2 log: Concurrent actions : 2
PM2 | 2020-09-07T12:10:46: PM2 log: SIGTERM timeout : 1600
PM2 | 2020-09-07T12:10:46: PM2 log: ===============================================================================
PM2 | 2020-09-07T12:10:46: PM2 log: App [index:0] starting in -fork mode-
PM2 | 2020-09-07T12:10:46: PM2 log: App [index:0] online
The text was updated successfully, but these errors were encountered: