kill_retry_time does not work after `pm2 reload`
Open
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?
The kill_retry_time stop working after pm2 reload in cluster mode.
How could we reproduce this issue?
// ecosystem.config.js
{
instances: '1',
exec_mode: 'cluster',
kill_timeout: 120000,
kill_retry_time: 5000,
}
KILL without reload, work as expected
pm2 start
pm2 kill
============
PM2 | pid=2627 msg=failed to kill - retrying in 5000ms
PM2 | pid=2627 msg=failed to kill - retrying in 5000ms
============
KILL after reload, stop working
pm2 start
pm2 reload 1
============ LOGS
PM2 | pid=2627 msg=failed to kill - retrying in 100ms
PM2 | pid=2627 msg=failed to kill - retrying in 100ms
============
pm2 kill
============ LOGS
PM2 | pid=2627 msg=failed to kill - retrying in 100ms
PM2 | pid=2627 msg=failed to kill - retrying in 100ms
============
Supporting information
$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date : Sat Feb 12 2022 18:29:57 GMT-0600 (Central Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.1.2
node version : 16.14.0
node path : /var/folders/ft/8qnyv8812mz3bf1bylm7gqyr0000gn/T/fnm_multishells/71392_1644528424507/bin/pm2
argv0 : node
uid : 501
gid : 20
uptime : 0min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.1.2
node version : 16.14.0
node path : /var/folders/ft/8qnyv8812mz3bf1bylm7gqyr0000gn/T/fnm_multishells/71392_1644528424507/bin/pm2
argv0 : node
uid : 501
gid : 20
===============================================================================
--- System info --------------------------------------------
arch : arm64
platform : darwin
type : Darwin
cpus : Apple M1 Pro
cpus nb : 10
freemem : 177553408
totalmem : 34359738368
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
===============================================================================
PM2 | 2022-02-12T18:29:57: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2 | 2022-02-12T18:29:57: PM2 log: PM2 version : 5.1.2
PM2 | 2022-02-12T18:29:57: PM2 log: Node.js version : 16.14.0
PM2 | 2022-02-12T18:29:57: PM2 log: Current arch : arm64
PM2 | 2022-02-12T18:29:57: PM2 log: PM2 home : /Users//.pm2
PM2 | 2022-02-12T18:29:57: PM2 log: PM2 PID file : /Users//.pm2/pm2.pid
PM2 | 2022-02-12T18:29:57: PM2 log: RPC socket file : /Users//.pm2/rpc.sock
PM2 | 2022-02-12T18:29:57: PM2 log: BUS socket file : /Users//.pm2/pub.sock
PM2 | 2022-02-12T18:29:57: PM2 log: Application log path : /Users//.pm2/logs
PM2 | 2022-02-12T18:29:57: PM2 log: Worker Interval : 30000
PM2 | 2022-02-12T18:29:57: PM2 log: Process dump file : /Users//.pm2/dump.pm2
PM2 | 2022-02-12T18:29:57: PM2 log: Concurrent actions : 2
PM2 | 2022-02-12T18:29:57: PM2 log: SIGTERM timeout : 1600
PM2 | 2022-02-12T18:29:57: PM2 log: ===============================================================================
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
Start by reproducing the issue with the ecosystem.config.js settings and the documented pm2 start, reload, and kill commands in cluster mode. Compare the retry interval before and after pm2 reload; done means kill_retry_time consistently produces 5000ms retries after reload as well as before it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100