Cloudflare 504 520 errors on XML Sitemap Generator

May I ask if this is a plugin for some CMS like WordPress, or self-made script, or rather some online tool like

If it’s running at your origin host/server, it might indicate your server needs more resources, or more power, even more time as the error states, to generate it successfully and completly in one batch file with all the URLs (up to 50k items as I remember per XML sitemap file or if more than that it should be split by multiple sitemap files, at least for Google).

I might suggest you to temporary enable the “Pause Cloudflare for this site” option from the Overview tab of the Cloudflare dashboard.
Run the process, after finish, un-pause it.

Other workardoun to try out is by temporary switching the DNS records for your domain name from proxied :orange: to :grey: (DNS-only).

Nevertheless, if your PHP settings at your origin server has value of 300 or more, even if you got the error “504 timeout” from Cloudflare, I believe the PHP process still works and does his job in the background until it hits that origin value set for timeout despite the error being shown.

  • you could try to increase the execution timeout in PHP just in case …
1 Like