Question

How to fix Cloudflare 524 timeout occurred

524 means Cloudflare connected to origin but the response took too long.

What to do first

  1. Find slow URLs with timing checks.
  2. Inspect DB and upstream dependencies for bottlenecks.
  3. Move long jobs to async processing.
time curl -s -o /dev/null -w '%{http_code}\n' https://llmsfile.com/your-heavy-endpoint
top -bn1 | head -n 20
sudo journalctl -u caddy --since '30 minutes ago' --no-pager | tail -n 80

Generate full 524 checklist