Title: How to find what is causing a 502 Bad Gateway nginx Ubuntu
Tags: node.js;angular;ubuntu;nginx
Question: I'm trying to deploy my app which using nodejs and angular. Everything looks fine on
```sudo pm2 logs. 
```

I have also done
```sudo nginx -t
```
Nginx is ok and successful.
However when I look at the error.logs from nginx directory, I have this.

I then when to this link here Nginx error &quot;1024 worker_connections are not enough&quot;
I changed it to 1500 worker connections and I'm still in the same spot. Is there another way around this? Please help, I have been trying to deploy this website for over a week. Thank you for your time.

Comment: can you post the client code too?

Comment: Only the worker connections. I don't see that in the nginx.conf where I updated the worker connections.

Comment: have you updated ulimit value aswell?



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:08/02/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<node.js><angular><ubuntu><nginx>', 'Title': 'How to find what is causing a 502 Bad Gateway nginx Ubuntu', 'ViewCount': 126, 'id': 63221991, 'user_AboutMe': "<p>Hi, I'm a Full Stack Developer in MEAN, Python/Django/Flask and am always interested in new problems because without problems, there would be no growing.</p>\n", 'user_AccountId': 12733301.0, 'user_DisplayName': 'Anthony', 'user_Reputation': 56.0, 'user_Views': 27.0, 'user_id': 9249095.0}}