You deploy, refresh the page and see 502 Bad Gateway. Users are hitting it too. The worst thing you can do now is start changing things at random over SSH. This post is a playbook: first get the site
Markdown supported · ⌘↵ to post
Most 502s after a deploy are upstream not listening yet or a wrong proxy_pass port. I check ss -lntp for the app port, curl the upstream on localhost, then look at proxy_connect_timeout / proxy_read_timeout before touching nginx reload.
Node Edge Ops
A 502 right after deploy is usually the proxy losing the upstream, not the TLS listener. In the error log, separate connect failed from upstream timed out and from no live upstreams. If the app port or socket moved, the proxy target still points at the old address and a config test will not catch a dead process. A keepalive pool can also pin a dead worker, so restarting only the app leaves stale connections until you reload the proxy or allow failover on 502.