Unitech / Unitech/pm2

Ressurected processes do not respect restarting policy

Open
#3,258 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SYS: Daemon SYS: Startup T: Bug
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

PM2 2.7.2
Debian Jessie

Sometimes resurrected on startup saved processes, that fail, just keep on restarting forever (instead of erroring and halting). The max_restarts property exists in the process.json ecosystem and is transferred into the /root/.pm2/dump.pm2 file. but after startup it seemingly gets ignored. The behavior persists if I don't change anything and just keep restarting. However unstartuping, resaving, startuping anew generally helps for a time. I can't see any pattern. It just happens randomly.

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

Reproduce startup resurrection with PM2 2.7.2 on Debian Jessie using a saved process whose max_restarts limit is reached. Compare the value in process.json and /root/.pm2/dump.pm2 with behavior after startup; done means failed resurrected processes stop or report an error instead of restarting indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.