grafclouds.com / documents / insights / training / devops-challenges / nginx-502-after-deploy

502 Bad Gateway Right After a Deploy

Beginner ~8 min read
Nginx

Scenario

You ship a routine release. Seconds later, users start hitting 502 Bad Gateway. The setup is a classic one: nginx sits in front as a reverse proxy and forwards traffic to your application listening on a local port. The deploy replaced the application build and restarted its service — and nginx itself was not touched at all. Still, because nginx is the thing printing the error, the immediate reaction in the incident channel is that nginx must be broken.

The Quick Fix on the Table

A colleague suggests going straight into the nginx configuration: adjust the proxy settings, maybe raise some timeouts, and run a reload. It feels productive — nginx is where the error appears, so nginx is where the fingers go.

Interview · Round 1

The quick fix is on the table and the room is waiting for your call. Would you sign off on it? Take a position and justify it — out loud or on paper — before revealing the analysis.