Report this

What is the reason for this report?

pm2 restart query

Posted on February 24, 2022

So i had to update a few lines of code in a file after i had deployed onto a droplet and started pm2. So I pushed the local change to git and pulled it in the server. Then on running the app, I realized the change wasn’t reflecting. After testing around what the issue was I tried stopping and starting again PM2. This worked as my changes got reflected. So does that mean anytime I update my codebase and pull the updates on server, I need to restart PM2. Wouldn’t it be a problem if say the app is a live around the clock app?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @sinhamahendra49,

Yes, it would seem that way.

Having said that, if you want to restart your App and see what and how the changes have been affected, I’ll recommend using staging App, test the changes there and wait until it’s out of business hours to restart your live APP.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.