Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pm2 flush doesn't work as expected #5529

Closed
Sailboat265 opened this issue Jan 18, 2023 · 1 comment
Closed

pm2 flush doesn't work as expected #5529

Sailboat265 opened this issue Jan 18, 2023 · 1 comment

Comments

@Sailboat265
Copy link
Contributor

Sailboat265 commented Jan 18, 2023

What's going wrong?

pm2 flush <app_id> or pm2 flush <app_name> doesn't appear to be flushing the logs successfully.

Linked issues: #4074, #4553, #4696

How could we reproduce this issue?

At pm2 version of 5.2.2, just try to run either pm2 flush <app_id> or pm2 flush <app_name>.

After that, do pm2 log <app_id> or pm2 log <app_name>, you will see the logs aren't flushed and still remained untouched.

Supporting information

--- PM2 report ----------------------------------------------------------------
Date                 : Thu Jan 19 2023 07:04:33 GMT+0800 (Malaysia Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.2.2
node version         : 17.9.0
node path            : not found
argv                 : /usr/bin/node,/usr/local/share/.config/yarn/global/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : pi
uid                  : 1000
gid                  : 100
uptime               : 2771min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.2.2
node version         : 17.9.0
node path            : /usr/local/bin/pm2
argv                 : /usr/bin/node,/usr/local/bin/pm2,report
argv0                : node
user                 : pi
uid                  : 1000
gid                  : 100
===============================================================================
--- System info --------------------------------------------
arch                 : arm64
platform             : linux
type                 : Linux
cpus                 : Cortex-A72
cpus nb              : 4
freemem              : 3414192128
totalmem             : 3977629696
home                 : /home/pi
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬──────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name             │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼──────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ Api-Alpha        │ default     │ 1.0.0   │ fork    │ N/A      │ 0      │ 0    │ stopped   │ 0%       │ 0b       │ pi       │ disabled │
│ 1   │ Temp Door API    │ default     │ 2.0.0   │ fork    │ 114442   │ 11m    │ 1    │ online    │ 0.6%     │ 63.5mb   │ pi       │ disabled │
└─────┴──────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/pi/.pm2/pm2.log last 20 lines:
PM2        | 2023-01-17T08:53:11: PM2 log: PM2 version          : 5.2.2
PM2        | 2023-01-17T08:53:11: PM2 log: Node.js version      : 17.9.0
PM2        | 2023-01-17T08:53:11: PM2 log: Current arch         : arm64
PM2        | 2023-01-17T08:53:11: PM2 log: PM2 home             : /home/pi/.pm2
PM2        | 2023-01-17T08:53:11: PM2 log: PM2 PID file         : /home/pi/.pm2/pm2.pid
PM2        | 2023-01-17T08:53:11: PM2 log: RPC socket file      : /home/pi/.pm2/rpc.sock
PM2        | 2023-01-17T08:53:11: PM2 log: BUS socket file      : /home/pi/.pm2/pub.sock
PM2        | 2023-01-17T08:53:11: PM2 log: Application log path : /home/pi/.pm2/logs
PM2        | 2023-01-17T08:53:11: PM2 log: Worker Interval      : 30000
PM2        | 2023-01-17T08:53:11: PM2 log: Process dump file    : /home/pi/.pm2/dump.pm2
PM2        | 2023-01-17T08:53:11: PM2 log: Concurrent actions   : 2
PM2        | 2023-01-17T08:53:11: PM2 log: SIGTERM timeout      : 1600
PM2        | 2023-01-17T08:53:11: PM2 log: ===============================================================================
PM2        | 2023-01-17T08:53:11: PM2 log: App [Temp Door API:1] starting in -fork mode-
PM2        | 2023-01-17T08:53:11: PM2 log: App [Temp Door API:1] online
PM2        | 2023-01-19T06:52:48: PM2 log: Stopping app:Temp Door API id:1
PM2        | 2023-01-19T06:52:48: PM2 log: App [Temp Door API:1] exited with code [0] via signal [SIGINT]
PM2        | 2023-01-19T06:52:48: PM2 log: pid=950 msg=process killed
PM2        | 2023-01-19T06:52:48: PM2 log: App [Temp Door API:1] starting in -fork mode-
PM2        | 2023-01-19T06:52:48: PM2 log: App [Temp Door API:1] online

@Sailboat265
Copy link
Contributor Author

Closed, marked as a duplicate for existing issues.

Sorry for the any inconvenience caused.

@Sailboat265 Sailboat265 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant