skip to Main Content

I’m running NodeJS application on CentOS with PM2. Everything works fine.

But I made a query changes in one of the controller file (add new column in SQL query). And then uploaded the project files to server. And then run PM2 restart [app-id].

It’s strange that new column was not returned in the api response payload.

Is there anyway to clear cache of PM2? or What is the issue exactly?

Please advise!

2

Answers


  1. Try running the following command.

    pm2 stop app_name
    pm2 restart app_name
    pm2 reload app_name
    
    Login or Signup to reply.
  2. For me worked sudo -u nodejs pm2 restart hello

    more info:
    https://marketplace.digitalocean.com/apps/nodejs#getting-started

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search