Common 503 errors

Varnish, the software that powers the Fastly CDN, will sometimes return standardized 503 responses due to various issues that can occur when attempting to fetch data from your origin servers. The generic status text associated with a 503 error is "Service Unavailable." It can mean a wide variety of things. The most common reasons this generic text appears include:

  1. The origin server generated a 503 error and Fastly passed it through as is.
  2. The origin returned a 503 error without a response header, so Fastly used the default response.
  3. The status line of the HTTP response from the origin was not parseable.
  4. VCL code was run that used the "error" statement without an appropriate response status (e.g., error 503 instead of error 503 "_broken thing_").

The following list provides the most common non-generic, standardized 503 responses and basic explanations for each.

503 Backend Read Error

This error typically appears if a timeout error occurs when Fastly cache servers attempt to fetch content from your origins. It can also be due to a variety of transient network issues that might cause a read to fail (e.g., router failovers, packet loss) or an origin overload.

Benchmarking your backend response times. Many outside factors cause backends response times to vary. Repeated, consistent Backend Read Errors frequently can be prevented by changing your backend timeout settings in the Fastly web interface. Start by running the following command to estimate response time for benchmarking purposes:

curl -s -w "%{time_total}\n" -o /dev/null http://example.com/path/to/file

Increasing your backend timeout settings. After benchmarking some of the slower paths in your application, you should have an idea of your ideal backend response time. Adjust the backend timeout values on the Edit a host page in the Advanced Options area. For more information, see our guide on changing connection timeouts to your origin.

503 Connection Timed Out

This error occurs if the request times out while waiting for Fastly to establish a TCP connection to your origin or waiting for your origin to respond to the request. Similar to Backend Read Errors, connection timeouts can be caused by transient network issues, long trips to origin, and origin latency. Two common ways to alleviate these timeout errors include increasing the connection timeout values set for the Fastly host or setting up an origin shield.

503 Backend Write Error

This error is similar to Backend Read Error but occurs when Fastly sends information in the form of a POST request to the backend.

503 Client Read Error

This error generally occurs because of a network issue between the client and Fastly. It is similar to the Backend Read Error but occurs when reading information from a client.

503 Connection Refused

This error occurs when Fastly attempts to make a connection to your origin over a specific port and the server refuses the connection. It typically appears when the wrong port is specified for the host in the Fastly web interface.

503 Network Unreachable

This error appears when Fastly cannot find a route to the given IP range. This generally occurs because of misconfigured or non-operational routers.

503 Backend Is Unhealthy

This error appears when custom health checks report a backend as down. It typically occurs when a Fastly edge server receives a client request and must make a request to your origin, but because the backend is considered unhealthy, Fastly doesn't try to send the request at all. This error may mistakenly appear instead of the Backend.max_conn Reached error the first time Fastly encounters the maximum number of connections to your backend.

503 Backend.max_conn Reached

This error occurs when Varnish makes a request to a backend in your Fastly service that has reached its defined maximum number of connections. By default, Fastly limits you to 200 origin connections from a single cache node to protect the origins from overload. To correct this error, increase the maximum connections limit to your origin. This error may also appear as "Maximum Threads for Service Reached."

503 Maximum Threads for Service Reached

See Backend.max_conn Reached.

503 Illegal Vary Header From Backend

This error occurs when a backend returns a malformed vary header with its response. A well-formed vary header tells Fastly to serve a different version of an object based on the value of the request header included within it.

503 No Stale Object Available

This error occurs when you configure Fastly to serve stale objects in the event of a backend failure but the stale object has expired and your backend is still failing for some reason (thus, no stale object is available).

503 Quorum Wait Not Reached

This error occurs when a Director used for balancing requests among a group of backends (only available via the Fastly API) cannot serve traffic based on its configuration because it does not have enough available backends in its group.

503 No Healthy Backends

This error occurs when a Director used for balancing requests among a group of backends (only available via the Fastly API) cannot cache the specified content because there are no healthy backends available in its group.

503 All Backends Failed or Unhealthy

This error occurs when a Director used for balancing requests among a group of backends (only available via the Fastly API) fails because all the backends are unhealthy or multiple backends from which the Director tried to fetch information failed with the same error.

503 SSL Handshake error

This error occurs when TLS negotiation between Fastly and your origin fails. To fix this error, review and correct your host's TLS configurations.

Back to Top