Skip to content

PM2 saves stopped status when system reboots #6036

@criyle

Description

@criyle

I am running a program that will create a transient systemd scope on its own, and I reboot the system using systemctl reboot.

During the reboot process, systemd sends the SIGTERM to all processes. There is one situation where

  1. The program was killed by systemd, so PM2 marked it as STOPPED
  2. The PM2 then receives the SIGTERM and it dump the process list with status STOPPED

In this case, the program will not restart the program after reboot and ignore previous pm2 save with running program.

The ~/pm2/pm2.log looks like this

2025-09-18T11:04:12: PM2 log: App [hydro-sandbox:0] exited with code [0] via signal [SIGTERM]
2025-09-18T11:04:12: PM2 log: pm2 has been killed by signal, dumping process list before exit...
2025-09-18T11:04:12: PM2 log: Deleting process 0

The expected behavior is the PM2 should restart the App correctly after reboot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions