Why do some subdomains time out with my Nginx reverse proxy?
#1
I’ve been trying to set up a reverse proxy for my home lab to access a few services securely, but I’m running into a weird issue where some of my subdomains just time out while others work perfectly. My setup uses Nginx on a VPS, and I can’t figure out if the problem is in my configuration files or if it’s something deeper with how the traffic is being forwarded.
Reply
#2
I’ve wrestled with that pattern before. Some subdomains timed out while others loaded fine. It felt like a routing mismatch in Nginx. In my case the failing domains started hitting the default_server block and were proxied to the wrong upstream, so I ended up chasing TLS and headers instead of the real issue. After I rechecked server_name blocks and made sure each subdomain had its own server block (no ambiguous default), the timeouts dropped a bit.
Reply
#3
DNS can lie in wait. I once had a subdomain that pointed to a stale IP because TTL hadn’t expired yet in my cordoned cache. When it finally changed, the traffic started behaving. Also check if AAAA records exist and if your upstreams aren’t listening on both IPv4 and IPv6 indiscriminately.
Reply
#4
Had a moment I thought it was the proxy but the upstream service was actually restarting under load. The logs showed occasional 502s and the service would disappear for a while. I put a simple healthcheck on the upstream, watched the rest of the requests time out and that helped me identify the real culprit.
Reply
#5
Have you checked if some subdomains resolve to the VPS via IPv4 and others via IPv6, and whether your Nginx stack handles that consistently?
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: