pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

PM2 not reflecting changes after modifying file

Open KnightCoder opened this issue 3 years ago • 10 comments

PM2 not reflecting changes after modifying file

Steps to reproduce:

I run approx 25 servers running 4 instances/clusters each on Windows running on a 4 core CPU. After I make any change on any file it restarts the respective server, however it doesn't reflect new changes and continues to show old changes only. Then I am forced to do the following steps for the changes to reflect.

$ pm2 stop all
$ pm2 kill 
$ pm2 start... (one by one)

Supporting information

OS: Windows

KnightCoder avatar Sep 13 '21 18:09 KnightCoder

Still experiencing this with pm2 4.5.0

mikgross avatar Jan 20 '22 12:01 mikgross

Same happened for me today

OS: Windows Pm2 version: 5.2.0

Tried below steps: File change detection works again like @KnightCoder mentioned

pm2 stop all pm2 delete all pm2 start ...

faizu88 avatar Jun 25 '22 18:06 faizu88

Hi, I have same problem with you.

OS: AlmaLinux 8.5 Node Version: 12.22.10 PM2 Version: 5.2.0

This step is a workaround. pm2 stop all pm2 delete all pm2 start ...

However. It looks like it does not reload change on some lines.

sgnsys3 avatar Sep 29 '22 18:09 sgnsys3

Hi, I have same problem with you.

OS: AlmaLinux 8.5 Node Version: 12.22.10 PM2 Version: 5.2.0

This step is a workaround. pm2 stop all pm2 delete all pm2 start ...

However. It looks like it does not reload change on some lines.

I got it, very useful! Thank you @sgnsys3

imgrbs avatar Sep 29 '22 18:09 imgrbs

Can we find a solution to this? more than 1 year openned

mikgross avatar Oct 20 '22 22:10 mikgross

Facing same issue on Ubuntu

apjyotirmay avatar Dec 12 '22 08:12 apjyotirmay

This bug is still there (ubuntu). Any updates on how to force PM2 to forget the old version of the code? I've tried to stop/delete the app, then start again - nothing changed. Deleted the compiled dist folder and tried to start again, PM2 got the dist folder (updated) from somewhere but still running the old code.

cheburan avatar Sep 27 '23 06:09 cheburan

This bug is still there (ubuntu). Any updates on how to force PM2 to forget the old version of the code? I've tried to stop/delete the app, then start again - nothing changed. Deleted the compiled dist folder and tried to start again, PM2 got the dist folder (updated) from somewhere but still running the old code.

This is happening to me too, I deleted the dist folder too and rebuild the code but pm2 is still running the old code.

mikiyasET avatar Mar 27 '24 21:03 mikiyasET

This bug is still there (ubuntu). Any updates on how to force PM2 to forget the old version of the code? I've tried to stop/delete the app, then start again - nothing changed. Deleted the compiled dist folder and tried to start again, PM2 got the dist folder (updated) from somewhere but still running the old code.

This is happening to me too, I deleted the dist folder too and rebuild the code but pm2 is still running the old code.

I had the same issue and made it work that way : - ps ax | grep pm2 will show you all the god deamons pm2 has running - kill all the PIDs of the god daemons ( sudo kill -9 PID) - start pm2 normally. It should work fine

Problem i had was that i started pm2 with different user and it bugged out. but anyways killing the god deamons should do it either way

Hope that helped

Daliush avatar Mar 31 '24 01:03 Daliush