Cloudflare preventing script completing

Hi, I have a small database, 3500 items, 150 members. I’m trying to to run my database backup script. I’m sure I’ve done this many times before, but not for the last 3 months. I’m getting an Error 524 after waiting for the script to complete. I pointed this out to my developer. He said…

“The database backup error you mention seems to be caused by Cloudflare. It seems Cloudflare doesn’t allow to run scripts with long execution time, it is timing out before the scripts finishes the backup.”

The error occur, I would say, somewhere after 1 minute of execution time. Which should be plenty of time to run my backup script. This was not timed, but approximated by me.

How to fix this from happening? Is this a known problem?

rgds
stu

It’s about a 100 second timeout. That’s a cloudflare limit to prevent connections from staying open excessively long.

For these situations, I suggest you edit your local hosts file (on your computer) pointing your domain to the origin IP address. This will bypass Cloudflare and its 100 second timeout limit.

Thank you. That puts the focus back on my host. Who so far has been dancing around with their replies.

Not necessarily. You can certainly ask your host if there’s a way to optimize performance. Their panel might even let you do backup scripts from their hosting back end.

As I said, if you’re doing it through your site, you may have to do the local hosts file trick on your computer to bypass Cloudflare. Typically, though, I do all my backups from the command line where there aren’t such limitations. It’s not very user-friendly that way, but it’s darned reliable.

This topic was automatically closed after 14 days. New replies are no longer allowed.