Bytenap Networks

Bytenap-Network_color

Have you ever seen an annoying Server Error 520? Web Server Is Returning An Unknown Error and wondered what causes this? Let’s find out with this article.

The Cloudflare 520 error is yet another common HTTP error. It can be frustrating for you as it can increase the bounce rate of your website.

fix-error-520
Example of Error 520

Usually, error 520 occurs when the origin server doesn’t work properly as expected and couldn’t service the request. As a result, returns an empty, unknown or unexpected response. The most common reason for the error to occur is either a cronjob, the program is utilizing excessive server resources which makes the server misbehave and not able to manage all the requests appropriately.

Below are few probable reasons for the Cloudflare 520 error to occur:

  • Origin Web server application crashes due to the execution of a resource-intensive script. Hence, the server is unable to provide timely responses to the requests.
  • Cloudflare IPs are blocked by the origin server’s firewall. Whitelisting those IPs addresses will resolve the problem.
  • Header size exceeding Cloudflare’s header size limit of 8kb. Hence, it won’t be able to process the header.
  • Origin server returns an empty response, with no HTTPS status code or response body. This error triggers when the DNS of the domain points to the wrong server.
  • The TCP protocol is responsible for establishing and maintaining a network connection. So, if the TCP idle timeouts are shorter than 300 seconds then this unknown error could be triggered.

Also Read: How to reduce bounce rate of a website

As we have discussed what the 520 error is and its cause, now let’s see how we can fix the error 520.

How to Fix the Error 520: Web Server Is Returning An Unknown Error?

Let’s see the troubleshooting steps to fix this HTTP error:

Disable Cloudflare

Before moving to the troubleshooting part, the first and foremost step is to disable Cloudflare. This is important as you need to isolate the Cloudflare factor from it.

First login to Cloudflare dashboard. Then, you can either disable Cloudflare from the homepage or turn off the Cloudflare DNS cloud.

To pause Cloudflare, you need to scroll down and go to the advanced actions and then click on the Pause Cloudflare on the Site link.

Go into development mode

Additionally, if you don’t want to disable or pause Cloudflare, you can go into the development mode and start troubleshooting the error.

Once, you have logged in to the Cloudflare dashboard, click on the caching tab (placed with other tabs at the top of the page).

Scroll down to the development mode section where you will see a small toggle button, turn it on.

Check out your server’s error logs

After disabling, pausing, or putting the Cloudflare into development mode, you can start troubleshooting error 520 by checking out your server’s error logs.

The method we provide is for cPanel users:

First of all, you need to log into cPanel. Look for the Errors button within the metrics section. Now click on it.

By default, the error log page will show the last 300 error messages. However, you can change the settings to read more error log messages.

Note: The setting can be changed if you have permission else you need to contact the host.

How to decode the error log

Ther error messages have structure. So, once you know the structure, you can easily decode the message.

Below is an example of an error message:

[Thu Jun 7 11:00:30 2018] [error] [client 135.12.23.34] error description: /path/to/file/with/error

Firstly, there is the date and time stamp then followed by LogLevel security that tells how severe the message is. Next, the client’s IP address and finally the actual message is shown and contains the path to the affected file.

Below, are the LogLevel severity level that can be found in the error log messages:

  • Emerg notifies that the issue is highly important and the server can’t be accessed currently
  • If Alert level is shown on the message, act quickly to avoid further damage
  • Crit denotes the criticalness of the condition or state
  • Error means something is wrong
  • Warn message gives warning about the issue but it isn’t critical
  • Notice gives some important details of server’s condition. But, you don’t need to worry much.
  • Info provides general level information
  • Debug messages contain the trace details while debugging is enabled.

Conclusion

The Error 520 can be a tricky error particularly as its a Cloudflare error.

Meanwhile, you can check out our SSL Certificates to provide some level of security.

Social Media

Stay Informed For Online World & Business Updates!

Scroll to Top

Linux Reseller Hosting Comparison Plan

LR-S LR-M LR-XL LR-XXL
SSD Disk
100GB
200GB
Unlimited
Unlimited
Bandwidth
Unlimited
Unlimited
Unlimited
Unlimited
cPanel Accounts
20
40
60
100
Free Migration
Free SSL Certificates
Domain Hosted
Unlimited
Unlimited
Unlimited
Unlimited
FREEBIES
350+ one click Script Installer
Weekly Backups
Free SSL Certificates
CloudFlare CDN
Domain Reseller Account
RESELLER FEATURES
Private Name Servers
WHM Panel
Client Backup Restores
Per cPanel SSH Access
ACCOUNT RESOURCES
Add-On Domains
Unlimited
Unlimited
Unlimited
Unlimited
Sub-domains
Unlimited
Unlimited
Unlimited
Unlimited
Parked Domains
Unlimited
Unlimited
Unlimited
Unlimited
Databases
Unlimited
Unlimited
Unlimited
Unlimited
FTP Accounts
Unlimited
Unlimited
Unlimited
Unlimited
CPU Core
1 Core
1 Core
1 Core
1 Core
RAM
1 GB
1 GB
1 GB
1 GB
Entry Processes
20
20
20
20
IO Speed
4 MB/s
4 MB/s
4 MB/s
4 MB/s
SERVER FEATURES
LiteSpeed Web Server
PHP v5.6 to latest
MySQL / MariaDB
Web Application Firewall
Caching
CloudFlare CDN
CloudLinux
CageFS
DDoS Protection
Server Locations
US | CA | DE
SECURITY FEATURES
DDoS Protection
Web Application Firewall
Brute-Force Protection
Brute-Force Protection
Two-Factor Authentication
Email Virus Scanner
CageFS Account Isolation
ByteNAP ASSURANCES
Uptime Guarantee
24x7x365 Support
Live Chat Support
Free Migration
Cancel Anytime
Instant Setup
AVAILABLE ADDONS
Instant SetupDedicated IP
$4.5/Mo
$4.5/Mo
$4.5/Mo
$4.5/Mo
Upgrade to Daily Backups
$5/mo
$5/mo
$5/mo
$5/mo

Managed Services

Managed Support

Get fully managed support from Experts
with Pro Active monitoring

Domain

Domain Registration

Register Domain Today

Domain Transfer

Domain Transfer are Quick, Easy &
Affordable

Email

Cloud Mail

Connect & Collaborate with Customers

Google Workspace

Create, Communicate & Collaborate

Security & Backup

SSL Certificate

Secure Your Data & Transactions with SSL Certificate

BitNinja

Secure your Webpages with BitNinja Server

Acronis Cloud Backup

Secure Data Backup for Businesses of All Sizes

Servers

Bare Metal Servers

Solid Performance Bare Metal Server

GPU Servers

Next-Generation GPU Server

Clearance Servers

Stable Clearance Dedicated Server

Cloud VPS

Linux VPS

Get Faster Loading Speed with Linux VPS Hosting

Windows VPS

Leading Windows VPS Hosting

Managed Linux VPS

Powerful Managed Linux VPS Hosting

Managed Windows VPS

Realiable Managed Windows VPS Hosting

Hosting

Linux Hosting

Feature Packed Linux Hosting

Windows Hosting

Stable Windows Hosting Server

Wordpress Hosting

Best & Secure WordPress Hosting

Linux Reseller Hosting

Start Business with Linux Reseller Hosting

Windows Reseller Hosting

White-label Windows Reseller Hosting