When I try to access my site I get a 504 error

Linode Staff

When I try to access my site I am getting a 504 Bad Gateway error. This has happened a few times over the past month or so. What does this mean? How do I fix this?

1 Reply

A 504 Gateway error happens when the server you are connecting to doesn't receive a quick enough response from another server, and so the request times out. This is usually indicative of a problem with an upstream server or the network connection.

This kind of error can be tricky to troubleshoot and is going to require a bit of investigating on your part. This could be caused by an inaccessible upstream service your web application uses, so if your web app relies on any such services that may be a good place to look first.

Additionally, you may want to check for network issues between the servers using MTR reports. This may help you identify a problem along the route that may be causing the connection to timeout

Diagnosing Network Issues with MTR

Aside from that, I'd recommend looking over your Firewall rules as well as checking your server logs for any clues to what could be causing the bad connection. I'd recommend the following guide for the former:

Control Network Traffic with iptables


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct