Random 520 error... the error go away when bypassing cloudflare

Hi,
We are still investigating the root cause where a random 520 Cloudflare errors keep occuring on our website.
We did not receive any 5xx error when we bypass Cloudflare.

Hello,

I am sorry to hear you are experiencing some issue.

Regarding Cloudflare 520 error, may I suggest you to try looking into below articles to troubleshoot the issue:

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Furthermore, do not skip below step and kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

This is a sub-domain.
If you do not have a valid SSL certificate which covers this hostname, you might experience 520 errors, even it’s possible if you are not using Full (Strict) SSL or at least if Cloudflare is not allowed, as already mentioned from above.

If it’s related to the SSL for your sub-domain, kindly consider looking into below wo articles:

Next, the name of your sub-domain indicates me some gray or bad activity could happen, and I have questions about it so please answer to us:

May I ask if this sub-domain is going to be used only by you?
Furthermore, would it be used testing Web related things, or even the doing port scanning?
In case if needed for some more information:

Above article about 520 error could help you.
Please, check log files at your origin host/server and consider above suggestions to troubleshoot why are they appearing on your sub-domaiun website.