10

Issuing "pm2 restart all" will restart all of the processes pm2 is managing.

I am wondering: If there have been changes to any of the source files, does this actually reload the changes? Or does it just restart the existing pm2 process in memory.

user1031947
  • 6,294
  • 16
  • 55
  • 88

1 Answers1

12

Yes, pm2 restart picks up local changes. Clients may have to clear cache/refresh if you're not seeing the changes.

Andy Gaskell
  • 31,495
  • 6
  • 74
  • 83
  • 7
    I'd be curious to know what the difference between the two as stated in title. `pm2 reload all` vs `pm2 restart all`. – shriek Sep 27 '16 at 23:23
  • 2
    > Yes, pm2 restart picks up local changes. It's worth noting that `pm2 restart` will _not_ pick up any changes to the pm2.yml or pm2.json file itself though. This has killed me several times. If your pm2.yml or pm2.json has changed you have to do a `pm2 stop && pm2 delete && pm2 start`. – apotek Mar 15 '19 at 16:49
  • @shriek answer here: https://stackoverflow.com/questions/44883269/what-is-the-difference-between-pm2-restart-and-pm2-reload – João Pimentel Ferreira Mar 30 '20 at 14:32