HTTP 504 Gateway Timeout error

May I ask what is your domain name?

May I suggest looking here:

https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#502504error

Not 100% always, but the reason for this could be for example the size of the file uploads to the site which could be too large and causing server timeouts.
If that is the case, therefore Cloudflare limits upload file size (per HTTP POST request) to 100 MB for both Free and Pro plans (more allowed for Higher Plans).

Furthermore, this issue can be either on the host’s end or Cloudflare’s end. To find this out you can temporarly try to disable by switching your records to :grey: or choose the option Pause the Cloudflare for your domain to bypass Cloudflare and try to see if the same happens again.

May I ask you to post what is your result when you visit yourdomain.com/cdn-cgi/trace?

Nevertheless, have you checked if you block any Cloudflare connections to your origin host / server?

  • or your ISP provider blocked something, possibly …

In case if needed:
https://support.cloudflare.com/hc/en-us/articles/201897700-Allowing-Cloudflare-IP-addresses