pm2:tldr:4c213
The pm2 resurrect
command is used in the PM2 process manager to resume monitoring and managing processes that were previously managed by PM2.
PM2 is a process manager for Node.js applications that allows you to run and manage multiple processes in the background. It provides features such as process monitoring, automatic restarts, and log management.
The resurrect
command is used to bring back to life any processes that were previously managed by PM2 but got terminated or stopped due to a system restart, crash, or manual intervention.
By executing pm2 resurrect
, PM2 scans its process list file (usually located at ~/.pm2/pm2.pid
) and restores the previously managed processes along with their configurations. It restarts them and resumes monitoring and managing their status.
This command is particularly useful when you want your application processes to automatically start and resume their management by PM2 after a system reboot or similar events.
It's important to note that in order for pm2 resurrect
to work, you need to have PM2 installed and running on the system. Additionally, the process list file should be intact and accessible to PM2 for successful resurrection.