If you are experiencing error 512, then you should consider looking whitelisting Cloudflares IP addresses. Your server/host could be blocking Cloudflare from getting the latest content form your site, which can cause the Error 512.

If you are using any kind of WordPress firewall then you should white list the IP’s there as well. I use personally bypass the CF IP’s in WordFence.

103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
104.16.0.0/12
108.162.192.0/18
131.0.72.0/22
141.101.64.0/18
162.158.0.0/15
172.64.0.0/13
173.245.48.0/20
188.114.96.0/20
190.93.240.0/20
197.234.240.0/22
198.41.128.0/17

You can find a txt list of Cloudflares IP-v4’s.