---
title: "mohammad khosravi (@smkh) | Hashnode"
description: "im a fullstack developer. Read the latest articles by mohammad khosravi on Hashnode."
url: "https://hashnode.com/@smkh"
---

@smkh

# mohammad khosravi

@smkh · Joined February 2023

im a fullstack developer

## Comments

[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](https://hashnode.com/posts/how-to-deploy-nodejs-apps-with-pm2-nginx-in-cluster-mode-on-production/5fcb13742e4db7780e482ce4/comment/63da36c0672b295ef3b4268d)

Comment · Article · Feb 1, 2023 · [How To Deploy NodeJS Apps With PM2 & NGINX In Cluster Mode On Production](https://hashnode.com/posts/how-to-deploy-nodejs-apps-with-pm2-nginx-in-cluster-mode-on-production/5fcb13742e4db7780e482ce4)
