<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docker Networking on StackOnward</title><link>https://stackonward.com/tags/docker-networking/</link><description>Recent content in Docker Networking on StackOnward</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 11 Sep 2026 05:08:00 +0800</lastBuildDate><atom:link href="https://stackonward.com/tags/docker-networking/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Troubleshoot 502 and 504 Behind a Reverse Proxy</title><link>https://stackonward.com/posts/502-504-troubleshooting/</link><pubDate>Fri, 11 Sep 2026 05:08:00 +0800</pubDate><guid>https://stackonward.com/posts/502-504-troubleshooting/</guid><description>&lt;p&gt;How to troubleshoot 502 and 504 starts at the hop that produced the status. Both codes come from a gateway or reverse proxy: 502 Bad Gateway means that hop did not get a usable response from upstream; 504 Gateway Timeout means it waited past its limit. Keep the headers, then reach the upstream from that hop&amp;rsquo;s network.&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://stackonward.com/images/posts/502-504-troubleshooting/en/gateway-failure-map.svg" alt="A client reaches an app through a CDN and reverse proxy; a failed connection becomes 502, a wait past the limit becomes 504" loading="lazy" decoding="async"&gt;
 &lt;figcaption&gt;Connection refused, DNS failure, and an invalid response usually point to 502. An upstream wait past the proxy deadline usually points to 504.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="how-to-troubleshoot-502-and-504-at-the-hop-that-returned-the-status"&gt;How to troubleshoot 502 and 504 at the hop that returned the status&lt;/h2&gt;
&lt;p&gt;A browser may sit behind Cloudflare or another CDN, a cloud load balancer, and Caddy or Nginx. Save the status, headers, time, and request ID:&lt;/p&gt;</description></item></channel></rss>