502 — Bad Gateway
Something in the middle got an invalid response from something further along. When it comes from a proxy it usually means the exit node could not complete the request to the target.
A proxy fixes part of this. If the 502 is coming from your proxy, more IPs are not the fix — retrying is, and so is a sticky session for anything that takes long enough to be interrupted.
Why it happens
The exit IP was dropped mid-request — common on a rotating pool if the peer disconnected.
The target closed the connection abruptly, which the gateway reports as a bad response.
The upstream is genuinely broken and would 502 without any proxy.
How to fix it
- Retry. A single 502 through a rotating pool usually succeeds on the next exit and needs no diagnosis.
- Compare against a direct request. If it 502s without the proxy too, the target is down.
- Use a sticky session for long or multi-step requests so a mid-flight rotation cannot break them.
FAQ
What does 502 mean?›
Why am I getting 502?›
How do I fix 502?›
Will a proxy fix 502?›
Other errors
Stop getting 502
Residential IPs across 199 countries, from $7.35/GB — no commitment, no monthly plan.
Get residential IPs →