Pm2 slow
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?
pm2 is very slow to list, add and remove, I have 1,000 processes running on a server with 40 vCPU 128gb ram, my resource usage is excess, however when I add only 1 new pm2 or delete it uses a lot of machine resources and is slow as if it checks all the processes that already exist, I wish a process was truly independent of the others
How could we reproduce this issue?
Upload 1,000 nodejs processes and run pm2 list, pm2 start or pm2 delete
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Fri Oct 04 2024 15:02:25 GMT-0300 (Brasilia Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.3.0
node version : 20.16.0
node path : not found
argv : xxxxxxx
argv0 : node
user : undefined
uid : N/A
gid : N/A
uptime : 364min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.4.2
node version : 20.16.0
node path : not found
argv : xxxxxxxxx
argv0 : node
user : xxxxxxxxxxx
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : win32
type : Windows_NT
cpus : Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
cpus nb : 40
freemem : 56539856896
totalmem : 137402527744
home : xxxxxxxxxxxx
===============================================================================
--- PM2 list -----------------------------------------------
xxxxxxx
------------------------------------------------------------
--- Daemon logs --------------------------------------------
xxxxxxxxx last 20 lines:
PM2 | 2024-10-04T15:02:21: PM2 error: Error caught while calling pidusage
PM2 | 2024-10-04T15:02:21: PM2 error: Error: Node - WIN-KVP6K81U1L3
PM2 | ERROR:
PM2 | Description = Quota violation
PM2 |
PM2 | 2024-10-04T15:02:23: PM2 error: Error caught while calling pidusage
PM2 | 2024-10-04T15:02:23: PM2 error: Error: Node - WIN-KVP6K81U1L3
PM2 | ERROR:
PM2 | Description = Quota violation
PM2 |
PM2 | 2024-10-04T15:02:25: PM2 error: Error caught while calling pidusage
PM2 | 2024-10-04T15:02:25: PM2 error: Error: Node - WIN-KVP6K81U1L3
PM2 | ERROR:
PM2 | Description = Quota violation
PM2 |
PM2 | 2024-10-04T15:02:26: PM2 error: Error caught while calling pidusage
PM2 | 2024-10-04T15:02:26: PM2 error: Error: Node - WIN-KVP6K81U1L3
PM2 | ERROR:
PM2 | Description = Quota violation
PM2 |`
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.
Research direction
No file or test is named. Reproduce the issue with 1,000 Node.js processes using pm2 list, pm2 start, and pm2 delete, then inspect the daemon logs for repeated pidusage quota violations. Done means these operations no longer incur excessive resource use or slow down with the number of processes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devops, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100