502 Bad Gateway From Nginx: Which Side Is Actually Broken
The proxy is telling you your application failed. Here is how to read the error log line and identify which of six things went wrong.
| Message | Cause |
|---|---|
Connection refused (111) |
Nothing listening on that port |
no live upstreams |
All backends marked failed |
upstream prematurely closed connection |
Your app crashed mid-response |
upstream timed out (110) |
App too slow, this is a 504 |
upstream sent too big header |
Response headers exceed the buffer |
Permission denied (13) |
SELinux or a socket permission problem |
Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud