502 error. Stops when cloudfare is paused

The 502 Bad Gateway usually is a result of the origin server sending an invalid response.

You may want to look in to whether your provider is blocking requests from Cloudflare.

https://support.cloudflare.com/hc/en-us/articles/218378978-What-should-I-do-after-seeing-a-502-or-504-gateway-error-on-my-site-