Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reset the id of pm2?

Tags:

node.js

pm2

I using pm2. After I started my app several times, the id increased. I deleted all in pm2, and started again, but the id didn't count from 0 any more. How can I reset it?

like image 637
Yao Zhao Avatar asked Jun 11 '15 15:06

Yao Zhao


People also ask

Does pm2 auto restart?

PM2 will keep your application forever alive, auto-restarting across crashes and machine restarts.

How do I check my pm2 service?

To check the logs for the different microservices of Lisk Service, use the command pm2 logs PROCESS_NAME , where PROCESS_NAME is the respective PM2 managed process that contains the logs you wish to view.


2 Answers

The solution is to restart pm2, by typing pm2 kill as said by ItalyPaleAle in the comments.

like image 116
Yao Zhao Avatar answered Oct 10 '22 20:10

Yao Zhao


Per pm2's GitHub:

$ pm2 reset <process>    # Reset meta data (restarted time...)

Reference: GitHub issue#1456

like image 38
Ace Avatar answered Oct 10 '22 20:10

Ace