504 Gateway Timeout

504 Gateway Timeout

The 504 HTTP response status code means that the server, acting as a gateway or proxy, is waiting for a response from the upstream server to complete the HTTP request, but no response was received within the expected time frame.

You can Check Your URLs HTTP Code for FREE

Introduction
In Action
Sample
Conclusion

Introduction

When the 504 Gateway Timeout status code is received, it means that the server, acting as a gateway or proxy, is waiting for a response from the upstream server to complete the HTTP request, but no response was received within the expected time frame.

This could be due to the upstream server being overloaded, experiencing delays, or not responding at all.

In Action

When you encounter the 504 Gateway Timeout status code, it means the server is acting as a middleman (proxy or gateway) for another server.

The initial request was forwarded to the upstream server, but it did not respond within a reasonable time, leading to a timeout. This is similar to the 502 Bad Gateway status code, where the server received an invalid response from the upstream server or experienced other issues.

Sample

In the example, when the client requests a resource, the server acts as a middleman and forwards the request to another server. However, the server that was supposed to provide the resource did not respond with an HTTP response in a timely manner.

As a result, the server returns a 504 Gateway Timeout status code to indicate the request couldn’t be fulfilled due to the lack of response from the upstream server.

Request

GET /news HTTP/1.1
Host: www.example.com

Response

HTTP/1.1 504 Gateway Timeout
Content-Type: text/html; charset=UTF-8
Content-Length: 134

< html>
< head>
< title>Gateway Timeout< \title>
< /head>
< body>
< p>The server is is not responding.< /p>
< /body>
< /html>

Conclusion

The 504 Gateway Timeout status code means that the server acting as a gateway or proxy didn’t receive a timely response from the server it forwarded the request to. This typically happens when the upstream server is slow or experiencing issues, causing a timeout in delivering the requested resource.

Related articles

999 Request Denied

999 Request Denied The 999 HTTP response status code is...

599 Network Connect Timeout Error

599 Network Connect Timeout Error The 599 HTTP response status...

598 Network read timeout error

598 Network read timeout error The 598 HTTP response status...

561 Unauthorized

561 Unauthorized The 561 HTTP response status code means there...

530 Site Frozen

530 Site Frozen The 530 HTTP response status code is...

999 Request Denied

0
999 Request Denied The 999 HTTP response status code is an unofficial catch-all error code returned...

599 Network Connect Timeout Error

0
599 Network Connect Timeout Error The 599 HTTP response status code indicates a timeout when trying...

598 Network read timeout error

0
598 Network read timeout error The 598 HTTP response status code indicates a timeout occurred during...

561 Unauthorized

0
561 Unauthorized The 561 HTTP response status code means there was an authentication failure. You can Check...

530 Site Frozen

0
530 Site Frozen The 530 HTTP response status code is a specialized server error used by...