How To Deploy NodeJS Apps With PM2 & NGINX In Cluster Mode On Production
What is a Process Manager?
Process Manager is a special program designed to effectively manage server processes and take benefit of server resources. It's useful to keep the application online and restart on failure.
Process Manager is also useful fo...
meswapnilwagh.com4 min read
mohammad khosravi
im a fullstack developer
hi, thank you for this article, its very helpful. but i have a problem and i search for it but got no answer. i have a nextjs project and i deploy it with pm2 and nginx. it works properly and i set max instances for my project in cluster mode. but when i stop the first instance the website is going down and get 502 nginx error and other instances not working until i restart the other instance. why this happens? note: i use this command for start my project with pm2: pm2 start npm --name myproject -i -1 -- start
with regards