ERROR CODES / ENGLISH

Relay 502 Bad Gateway: the site cannot reach upstream

What a 502 from a relay means, how to tell a temporary upstream problem from a broken site, and when to switch providers.

Reviewed 2026-11-13 · ERROR CODES / 502 · Chinese detail: 完整中文页

What it means

The connection between the site and its upstream broke. The problem is not on your side.

502 Bad Gateway

nginx 502

The nginx 502 form is the same error as reported by an nginx gateway.

Common causes

ShareCause
50%Upstream unreachable
30%Site gateway timeout
20%The site itself is faulty

How to confirm

Wait a few minutes and retry. If the request recovers, the cause was a brief upstream problem. If it stays 502, test whether every model fails or only one. Then try another group and another site. A 502 that follows one model points at that channel; one that follows the whole site points at the site.

Fix

On your side:

  1. Wait a few minutes and retry.
  2. Switch group.
  3. Switch site.

On the service side:

  1. The site needs to check upstream connectivity.

Switching groups shows whether the fault is limited to one upstream channel. Switching sites shows whether the provider as a whole is affected.

If it still fails

SymptomResponsible party
Recovers after a few minutesUpstream jitter
502 all the timeSite failure
Only one model returns 502That channel

Frequent 502 responses mean the site's upstream quality is poor. If the error keeps returning across groups and models, change sites rather than retrying indefinitely.

General guidance, not a statement about any specific provider. For measured data, see the relay directory and method.