504 Gateway Timeout

504 Gateway Timeout is a status a proxy might emit, when it’s acting as a proxy and not getting a response from an upstream server.

This is fairly close to 502 Bad Gateway, except that 502 should be returned when a proxy got an invalid response, and 504 typically when the proxy didn’t get a response at all (or too late).


HTTP/1.1 504 Gateway Timeout
Content-Type text/html


<p>We did not get a timely response from our upstream application server :(</p>


HTTP series

This article is part of a series about the HTTP protocol. Read them all here:

Informational 1xx

Successful 2xx

Redirection 3xx

Client Error 4xx

Server Error 5xx

Web mentions