CloudFlare support-error 522:connection timed out Error 522: Connection timed out

Source: Internet
Author: User
Tags block ip address cloudflare error 522

The 522 error means that we are unable to reach the origin Web server at all.

There are several main reasons for this:

    • The original server is too overloaded to respond.
    • The source web server has a firewall that blocks our request, or the packet is dropped within the network of the host.
    • The source Web server is offline, or with our incorrect DNS settings set for its IP address (that is, away from our request is sent to the wrong place).
    • There is also a network routing problem between us and the original Web server.
    • The origin server keeps the connection disabled.

In all these cases, it is worthwhile to check that the origin Web server is active before going further here to accept HTTP requests, and also with our DNS settings in your account correctly.

The original server is too overloaded to respond

ensure that the source server is not overloaded. If it is, it may be a drop request. in general, one benefit to check is the average load. on Linux/unix, you can run the command by "W" on the command line, or use the ' top ' command to check for checks. what constitutes depending on the load value can be based on the computer and run on the software, but generally over 10-20 of the average load may mean that the server is overloaded with different high loads. This is best for your host or this system administrator to check if you are unsure.

The origin has a firewall (or rate limiter) that blocks our request

This is the most common cause of intermittent 522 errors. The key thing to check out initially is-

    • Make sure you do not have the IP address of the. Htaccess,iptables, or your firewall to block CloudFlare.
    • Make sure your hosting service provider is not rate limiting or block IP address requests from CloudFlare, and ask them to address the IP address mentioned in the whitelist Http://

when traffic passes through the cloudflare of a website, the origin will first see the requirements coming from us. Most of the requirements of the website through CloudFlare will appear only from our IP address. Because of this, this often triggers firewalls and IP rate limiters from our block request that the site is under attack. Cphulk (included with the cpanel) and other services already know to do this. before preventing this from happening, make sure that the IP address mentioned here has been whitelisted, or that the rate limit is completely disabled.

Network routing issues between the CloudFlare and the original Web server

This is more difficult than other causes, troubleshooting, and best to ensure that other potential causes have been excluded from the check before this. If you think this is the case, please submit a support ticket with our support team. useful information for the user to provide that would be-

    • What information has been signed to date.
    • mtr or traceroute from the server to one of our IP addresses, it is best that you have seen one of the IP addresses in the past away from our request. You can find out how to run the subway or trace the route information here .

The original server keepalive is disabled

Use of CloudFlare the keep-alive header to improve performance. Disabling it will cause the connection to fail and in some cases return 522s. This feature, by default, is in the current version of most major web servers, so unless you explicitly disable it, this should not be an issue.

What exactly is triggering the 522 error?

When CloudFlare fails to establish a TCP connection to the site, the original server 522 error response is returned.

when someone accesses a dedicated web site that is enabled for CloudFlare, a connection is established between the CloudFlare and the site's source server. to establish a connection, TCP uses a three-time handshake.

    1. Syn:cloudflare sends three SYN packets to the source server.
    2. SYN + ACK: In the response, the source server responds with a SYN + ACK.
    3. ACK: The last CloudFlare sends an ACK back to the source server.

at this point, both the CloudFlare and the source server have received the connection acknowledgement and established communication. If the source server does not send a SYN + ACK back to the CloudFlare within 15 seconds, a 522 error occurs and the connection is closed.

Here is a diagram showing a successful TCP handshake:

Here is an example of a SYN + ACK that does not return within 15 seconds of the original server, triggering a 522 timeout:

when originating with a SYN + ACK response and establishing a TCP connection, but never responding for 90 seconds (the ACK request in the 524-piece ACK request occurs with a 522 timeout for another condition, but the wait time is too long to send the response). Here is an example of a scenario that illustrates this:

checking these conditions with your server administrator or a managed service provider is the best way to resolve these errors. If there is a network problem, a trace route from the site origin or Metro may be useful (with the following).

If you continue to see the exclusion of the above possibility and resolve the issue after the 522 error, please contact CloudFlare support for further investigation.


MTR/Route tracking diagnostics and use


CloudFlare support-error 522:connection timed out Error 522: Connection timed out

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.