pm2
pm2 copied to clipboard
reboot : always show Current process list is not synchronized with saved list. App nast differs. Type 'pm2 save' to synchronize.
What's going wrong?
When I pm2 start app.js --name app and reboot , the app will disappear and show the message.
Until I use pm2 resurrect
, it will show the app
[PM2][WARN] Current process list is not synchronized with saved list. App nast differs. Type 'pm2 save' to synchronize.
How could we reproduce this issue?
https://sobus-piotr.medium.com/pm2-share-the-same-daemon-process-between-multiple-users-dd7ecae6197a
Supporting information
The command pm2 save that I use
I found I do that
it will generate three location /etc/pm2daemon/pm2.pid /etc/pm2daemon/.pm2/pm2.pid /home/aa/.pm2/pm2.pid
Have you managed to fix this? Having the same issue, need to keep doing sudo pm2 resurrect
after restart.
if you are using debian 12 or any linux based on new systemd after run pm2 resurrect, you need to run pm2 startup.
Look the results:
pm2 startup [PM2] Init System found: systemd Platform systemd Template [Unit] Description=PM2 process manager Documentation=https://pm2.keymetrics.io/ After=network.target
[Service] Type=forking User=root LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity Environment=PATH=/root/.nvm/versions/node/v18.18.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin Environment=PM2_HOME=/root/.pm2 PIDFile=/root/.pm2/pm2.pid Restart=on-failure
ExecStart=/root/.nvm/versions/node/v18.18.2/lib/node_modules/pm2/bin/pm2 resurrect ExecReload=/root/.nvm/versions/node/v18.18.2/lib/node_modules/pm2/bin/pm2 reload all ExecStop=/root/.nvm/versions/node/v18.18.2/lib/node_modules/pm2/bin/pm2 kill
[Install] WantedBy=multi-user.target
Target path /etc/systemd/system/pm2-root.service Command list [ 'systemctl enable pm2-root' ] [PM2] Writing init configuration in /etc/systemd/system/pm2-root.service [PM2] Making script booting at startup... [PM2] [-] Executing: systemctl enable pm2-root... [PM2] [v] Command successfully executed. +---------------------------------------+ [PM2] Freeze a process list on reboot via: $ pm2 save
[PM2] Remove init script via: $ pm2 unstartup systemd
Have you managed to fix this? Having the same issue, need to keep doing
sudo pm2 resurrect
after restart.
@jpalo Man, this command saved my life. Thanks a lot!
Have you managed to fix this? Having the same issue, need to keep doing
sudo pm2 resurrect
after restart.@jpalo Man, this command saved my life. Thanks a lot!
thanks for highlight saved my time
Have you managed to fix this? Having the same issue, need to keep doing
sudo pm2 resurrect
after restart.@jpalo Man, this command saved my life. Thanks a lot!
thanks for highlight saved my time
x2
Have you managed to fix this? Having the same issue, need to keep doing
sudo pm2 resurrect
after restart.
Thank you friend