Unitech / Unitech/pm2

All Service in Process list showing 0% CPU and Mem: {#aN-fg} in Memory. Restart Service Error.

Open
#5,853 6 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

All Service in Process list showing 0% CPU and Mem: {#aN-fg} in Memory. I tried to run pm2 restart all, but it got error show as below. Even I kill all process and start again still got the same issue.
PS D:\IT\IPchangeTracker> pm2 restart all
Use --update-env to update environment variables
[PM2] Applying action restartProcessId on app [all](ids: [ 0 ])
[PM2][ERROR] Process 0 not found

PM log:
2024-07-04T14:40:01: PM2 log: [Watch] Start watching IPTracker
2024-07-04T14:40:01: PM2 log: App [IPTracker:0] starting in -fork mode-
2024-07-04T14:40:01: PM2 log: App [IPTracker:0] online
2024-07-04T14:40:02: PM2 error: Error caught while calling pidusage
2024-07-04T14:40:02: PM2 error: Error: ERROR:

Description = Not found

2024-07-04T14:40:10: PM2 error: Error caught while calling pidusage
2024-07-04T14:40:10: PM2 error: Error: ERROR:

How could we reproduce this issue?

Supporting information

# Run the following commands
$ pm2 report

PS D:\IT\IPchangeTracker> pm2 report

--- PM2 report ----------------------------------------------------------------
Date                 : Thu Jul 04 2024 14:35:22 GMT+0100 (British Summer Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.4.1
node version         : 21.2.0
node path            : not found
argv                 : C:\Program Files\nodejs\node.exe,C:\Users\Administrator\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0                : node
user                 : undefined
uid                  : N/A
gid                  : N/A                                            ││ watch & reload        ✔
uptime               : 6min                                                                                        │
===============================================================================le restarts     0
--- CLI ----------------------------------------------------                                                       │
local pm2            : 5.4.1                                          ││ Comment               N/A
node version         : 21.2.0                                                                                      │
node path            : not found
argv                 : C:\Program Files\nodejs\node.exe,C:\Users\Administrator\AppData\Roaming\npm\node_modules\pm2\bin\pm2,reportswitch boards | up/down/mouse: scroll | Ctrl-C: exit
argv0                : C:\Program Files\nodejs\node.exe                  To go further check out https://pm2.io/
user                 : Administrator
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : win32
type                 : Windows_NT
cpus                 : Intel(R) Xeon(R) E-2334 CPU @ 3.40GHz
cpus nb              : 8
freemem              : 12018438144
totalmem             : 17019039744
home                 : C:\Users\Administrator
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ IPTracker          │ fork     │ 1    │ errored   │ 0%       │ 0b       │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
C:\Users\Administrator\.pm2\pm2.log last 20 lines:
PM2        | 2024-07-04T14:31:32: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:32: PM2 log: Process with pid 5796 still alive after 1600ms, sending it SIGKILL now...
PM2        | 2024-07-04T14:31:32: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:32: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:32: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:33: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:34: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:34: PM2 log: pid=5796 msg=failed to kill - retrying in 100ms
PM2        | 2024-07-04T14:31:34: PM2 log: Process with pid 5796 could not be killed
PM2        | 2024-07-04T14:31:34: PM2 error: app=IPTracker id=0 pid=5796 could not be stopped
PM2        | 2024-07-04T14:31:34: PM2 error: Process with pid 5796 already exists
PM2        | 2024-07-04T14:31:49: PM2 error: Process with pid 5796 already exists

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied pm2 report and daemon logs for PM2 5.4.1 on Windows with Node.js 21.2.0, focusing on the pidusage errors and failed process termination. No source file or test is identified; completion would require reproducing the 0%/0b metrics and restart errors, then verifying correct process status and metrics.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, devops, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.