Zero Downtime deployment #80558
Unanswered
rajatdhoot123
asked this question in
Help
Replies: 1 comment 5 replies
-
It's been a while now since I worked with pm2... but if you are in cluster mode, these share the same I'd guess, that when you swap it for a new Maybe this old thread can point you in the right direction: #10675 (comment) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’ve deployed a Next.js application using PM2 in cluster mode with max instances. The setup is part of a distributed system where the app runs on multiple servers, all behind an NGINX reverse proxy.
My assumption was that reloading PM2 (e.g., using pm2 reload) would gracefully restart workers one by one, ensuring zero downtime. However, I'm still encountering 502 errors during deployment.
Any suggestions on how to achieve zero-downtime deployments with PM2 in this setup?
MY PM2 setup below
Beta Was this translation helpful? Give feedback.
All reactions