Bobcares

Cloudflare error 504 gateway timeout – How to fix

by | Jan 21, 2021

Stuck with Cloudflare error 504? We can help you.

Cloudflare error 504 gateway timeout occurs when Cloudflare is unable to establish a connection with the origin web server.

This happens when Cloudflare requests a web page and gets blocked by the site’s web server or firewall or load balancer, resulting in the request timeout.

It can also occur if we change the IP address of the origin web server and did not update the same in the Cloudflare portal.

Here at Bobcares, we often fix this error for our customers as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix this Cloudflare error for our customers.

What causes error 504 gateway timeout?

Some of the main causes for the Cloudflare 504 gateway timeout error is given below:

1. Receiving 504 from the origin web server is considered as one of the common causes of 504 gateway timeout error.

cloudflare error 504

2. 504 error originating from Cloudflare end.

cloudflare error 504

3. The 504 gateway timeout error at Cloudflare due to large uploads

How to fix Cloudflare error 504 gateway timeout

We will see how our Support engineers troubleshoot and fix Cloudflare 504 gateway timeout error for the above-mentioned causes.

1. Fix for Receiving 504 from the origin web server 

We will ensure the below aspects at the webserver:

1. First we will check whether the IP address is correctly set for the domain in the Cloudflare portal.

2. Then we have to ensure that the server firewall is not blocking any connections from Cloudflare. We can whitelist the Cloudflare IP addresses if they are not among the whitelisted IPs on the server.

3. High load on the server can also lead to timeout issues and website errors. So we will check whether there are any applications running with high CPU usage, or if any website traffic is there on the webserver.

4.  Finally we will check if the web-server (httpd, apache, nginx) and Mysql services are properly running in the server by checking their status.

2. Fix for 504 error originating from Cloudflare

At times error 504 will be arising from Cloudflare’s end. In this case, Cloudflare will be already aware of the issue and working on it.

However, we will confirm this by checking “https://www.cloudflarestatus.com/.” for the Cloudflare System Status.

For avoiding delays in processing the inquiry request we can provide the following details pro-actively to the Cloudflare Support:

1. The exact time and timezone when the issue occurred
2. URL that resulted in the HTTP 504 error as a response.

3. Fix for 504 Gateway Timeout at Cloudflare Due to Large Uploads

The reason for this is the size of the uploads to the site being too large causing server timeouts.

Cloudflare limits upload file size (per HTTP POST request) to 100 MB for both Free and Pro plans.

This issue can be either on the host’s end or Cloudflare’s end. To find this out we will bypass Cloudflare with the DNS hosts file and try to upload again.

[Still, facing error? We are happy to help you!]

 

Conclusion

To conclude, we saw some of the common causes for the 504 error.  Also, we saw how our Support Engineers troubleshoot and fix Cloudflare 504 gateway timeout error.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF