Whenever you access a server through the Internet, a HTML status code is returned from the server to your browser. A number of these are error codes, which appear when there is a problem loading a page. The codes are displayed in the browser, and help webmasters and visitors understand what is going wrong so they can try to solve the problem. The "504 Gateway Time Out" is one such error code.
Video of the Day
When you attempt to access a resource, the server that your action is routed through places a time limit on that request. If a response is not received after a certain amount of time, a 504 error code is returned to the browser. The "5" at the beginning of the error code indicates that the problem is with the server being contacted, rather than your client server. The usual cause of a 504 error is attempting to contact a server that is either down, perhaps for maintenance, or otherwise not operating properly.
A client receives the request to access a certain URL. It accesses a Domain Name Server (DNS) to obtain the IP address of that site. An IP socket connection is made with the IP address obtained from the DNS, and a HTML data stream is sent through the socket. The client receives an HTTP data stream back from the server, and if the resource cannot be accessed after a certain amount of time, the data stream returned will contain the 504 error code. The browser then displays the code onscreen.
504 Error Notifications
The 504 is technically called the "504 Gateway Timeout" error. Like the "404 Not Found" error, though, the message notification for the 504 can be customized. You will be commonly presented with one of the following messages on an otherwise blank page: "504: Gateway Timeout," "HTTP 504," or "HTTP Error 504 – Gateway Timeout." However, you may be presented with a custom error screen, or simply be redirected to another page, such as the site's home page.
Fixing a 504
Because the 504 is a server-side error, you cannot fix the problem unless you own and maintain the server in question yourself. However, you do have a few options available to you. You could email the webmaster if you know her email address and notify her of the problem. You could try refreshing a few times, to see if it was a temporary problem, or you can return to the site at a later time, when the error will hopefully have been resolved.