HTTP

HTTP 503 Service Unavailable vs 521 Web Server Is Down

Both HTTP 503 (Service Unavailable) and 521 (Web Server Is Down) belong to the 5xx Server Error category. 503 indicates that the server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header. Meanwhile, 521 means that cloudflare-specific. The origin server refused the connection.

Description

The server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.

When You See It

During maintenance windows, server overload, or when the application pool is exhausted.

How to Fix

Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue.

Description

Cloudflare-specific. The origin server refused the connection.

When You See It

When Cloudflare can't establish a TCP connection to the origin server.

How to Fix

Check that the origin server is running and the firewall allows Cloudflare IPs.

Key Differences

1.

HTTP 503: The server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.

2.

HTTP 521: Cloudflare-specific. The origin server refused the connection.

3.

You encounter 503 when during maintenance windows, server overload, or when the application pool is exhausted.

4.

You encounter 521 when when Cloudflare can't establish a TCP connection to the origin server.

When to Use Which

For 503 (Service Unavailable): Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue. For 521 (Web Server Is Down): Check that the origin server is running and the firewall allows Cloudflare IPs.

Learn More