ClearFront
Free Trial Nova Video 1 Month Nova Video 3 Months Nova Video 6 Months Nova Video 1 Year Nova Video CDN Web Acceleration All Products
Open New Ticket Help Center Installation Guides Network Status
Login Register
ClearFront

Help Center

Products Login Register

I am seeing a lot of 502 and 504 errors

0

If you are receiving a lot of 502 or 504 errors this troubleshooting guide contains a few common tips to understand and resolve them. The HTTP code 502 indicates a "Bad Gateway" response and indicates that our server received an invalid response from your origin server. The 504 code indicates a "Gateway Timeout", that means that our server did not receive a successful response from your origin server in a set amount of time. This is what is usually causing the errors:

Your server is offline

The most likely cause for 502 errors is that your origin server is offline and our servers are not able to connect to it. In this case, our edge servers will always attempt to serve the files from our cache, but if they are not there we will serve the 502 response to end users.

Your server firewall is blocking our edge servers

Because our servers act as a proxy to all your users, this means that when you first start serving traffic, there will be a lot of requests going from our edge nodes to your servers. This might cause certain Firewall or security software to accidentally mistake these connections as a threat and block them.

To work around this problem, you can use our edge server IP list to whitelist all the connections coming from our network. The list is available inside your panel. To keep everything working, also make sure to periodically update your configuration to reflect any changes on our network.

Network congestion

The internet works on a limited set of paths that the connection can take and if something goes wrong somewhere down the line and our edge server is far away from your server, it might happen that the network might get congested and 502 and 504 errors get returned as a result of the network breaking down somewhere down the line. This is an unlikely situation, but it can happen in rare cases.

Our servers are experiencing problems

We monitor our network both automatically and manually 24/7, so this is a very unlikely situation, but of course, it can also happen that our servers are experiencing problems as well. If you are certain that the points above do not apply to you and that this problem lies on our side, send us a support ticket and we will investigate the situation immediately.

Timeout Defaults

We serve a 502 regardless of whether there is a TCP connection failure to origin, or lack of data response from origin (ie once the connection is made and no data is sent back/delayed from origin). By default we will wait 10s for a TCP connection (so if you are getting immediate 502s it’s likely your origin WAF or configuration blocking requests from CDN), or 60s if connection is successful but no data is sent from the origin. This is reconfigurable via Safehop.

Debugging Tools

We offer debugging tools via that allows users to test latency, traceroutes and HTTP requests from multiple locations. This can give you a picture if certain locations are blocked, or origin latency is high causing sporadic timeouts for example. Some of this information can also be relayed to our Support team (support@cfplatfrom.xyz) if clarification is needed on access issues.

Was this answer helpful?

Related Articles

Fixing the "CDN Acceleration Is Not Enabled" error If you're seeing an error message indicating that CDN acceleration isn't detected on your website... I have Unexpected CDN URL Redirects Sometimes we see the CDN URLs return a 301 redirect back to your own website. Usually, when... Not all of my WordPress static URLs are being served by ClearFront In some cases, even after configuring the ClearFront CDN plugin in WordPress, some or even all... My browser is still sending cookies despite enabling the Disable Cookies feature for my Pull Zone When you run GTMetrix or other diagnostic tools on your website, you may find that the... How do I run a traceroute? Traceroute is a commonly used tool for diagnosing network routing issues, measuring delays...
« Back

Loading...
Loading...

Generate Password

Please enter a number between 8 and 64 for the password length
Choose language
العربية Azerbaijani Català 中文 Hrvatski Čeština Dansk Nederlands English Estonian Persian Français Deutsch עברית Magyar Italiano Macedonian Norwegian Português Português Română Русский Español Svenska Türkçe Українська

Copyright © 2026 ClearFront. All Rights Reserved.

Dashboard Services Products Billing Support Help Center