Origin request with HTTP2/prefetch causes error 520

We are getting random 520 errors from cloudflare.
We logged all request headers as well as return headers and body and found the source of the issue, but it needs to be double checked and fixed by cloudflare support.
Just want to double check here in the community first, to see what your ideas on this are.

The problem is, that we can’t provide a HAR, as the issue is due to some headers that are set randomly by cloudflare (or the browser?) - see below

e.g. 2 requests to the same page, from the same user within 2 minutes from each other (though it can be immediately refreshed, and we get the same result).
At first the page gives error 520, when reloading the page it works fine though.

=> Error 520

=> works perfectly fine

We identified, that this issue happens always for requests that have:

  • the request was sent with HTTP/2.0 from cloudflare to our origin
    (despite Understanding Cloudflare HTTP/2 and HTTP/3 Support – Cloudflare Help Center saying connection to server is HTTP/1.1 only) – our server theoretically is set up for HTTP2, but we cannot test it, since we only use cloudflare SSL.

  • and these 520 requests also ALWAYS have the “purpose:prefetch” request header

There are some small differences in other headers too, but I don’t think these matter (can provide it though, if you need it).
What however stood out, is that all requests that have this HTTP/2.0 and prefetch combo show up as Error 520 for the eyeball request of the user.
Our response headers & response body are identical in BOTH cases.

Can someone from Cloudflare please take a look at this?
We would be happy to help debug this further, we just need to know what else is needed on your end.


Thx, we saw that and went along it. That’s why I opened this topic.

It seemingly takes weeks for Cloudflare support to reply, that’s why I wanted to first publicize the issue here, since I am not sure if the request id,… are still logged by the time they reply.

include your ticket number so the forum mods can check the status.

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