520 cloudflare errors occur from time to time when there are more connection requests

As described in the topic title, the 520 cloudflare error occurs from time to time when there are many connection requests
The following details:

  • When I enable the free proxy service provided by cloudflare
    I will get a 520 cloudflare error message from time to time when I make more connection requests

  • When I close the proxy service, my server will not generate a 520 error
    I don’t know if it is because my account is free?

Do I need to upgrade my account to solve this problem?

Have you go through this article:

520 is usually generated by Cloudflare but not other web servers.

1 Like

First of all thanks for your reply.

This article has been read.
The hosting service provider I use is gcp. There are no special restrictions on the firewall to block cloudflare, and Load Balancer is not used.

The point that confuses me the most is
When the number of people connected is small, we will not receive a 520 cloudflare error message.

But as the number of people is large, we will frequently receive 520 error messages.

Have you dig into your server logs to see if there’s any entry related to the issue? How about server metrics e.g. CPU usage, database load?

Yes, our team has tested this 520 error.
The load of cpu and database is close to 100%.
But we don’t know what the specific impact of this load situation on the 520 error is.
Because it won’t happen without going through the cloudflare proxy.

we collection some additional test information

1.GCP access_log has no 520 error log (looks all good)
2.Driect connection to GCP without any 520 error (with same connection session)
3.Using CF proxy with cache make some 520 (looks random file url)
4.Using CF with developer mode is fine, no 520 error
5.we check GCP CPU and SQL load below 50% still got 520 error
6.when doing load test at GCP will get 100% CPU load for 2~3 secs, and upload 100Mbps+ content

The HTTP 520 status code is more like Cloudflare’s proprietary status code, so it won’t be returned from your GCP instance. But what you need to take a look at is the possibility of TCP connection reset from your instance, invalid HTTP response returned, empty response returned, missing response headers in HTTP response, and more.

If you notice the above behaviour occasionally, then it could be the cause for Error 520 generated from Cloudflare.

1 Like

This seems to be a good way to figure out this error.

We will collect more information and log for this,
Does Cloudflare able to find more detail log for error520 by RayID
or does any tool for troubleshooting include dump data for response or trace error connection package? or do we need to upgrade to Pro account for this tool.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.