When I try to see which files will be added to or removed from a local copy when I sync an http remote which is protected by cloudflare, I run rclone with a '--dry-run' option, and rclone reports that it is going to remove a lot of files which are still definitely present on the remote. The list of deleted files changes each time I run the command: sometimes the list grows, other times it shrinks, and in some cases it contains only files which really are missing on the remote (which is what I would expect to see in 100% of the runs).
When I run rclone in debug mode I see that the problem occurs because http server returns an error 524 for the problematic files, and because of that rclone decides that the file is not on the remote. The error in the log looks
like that:
DEBUG : <name of some file>: skipping because of error: failed to stat: HTTP Error: 524
In fact this error is temporal - the error code is specific to cloudflare, and basically it means that the origin web server is taking too long to respond. Cloudflare documentation offers a few solutions (like, paying much more for its services), but all of them are not applicable.
It it possible to make rclone retry such errors till the operation eventually succeeds?
One kind of a workaround that I found is to use '--tpslimit' option (I set it to 20), and (for the time being) it seems to help, but on the other hand it greatly increases the length of an operation (by a factor of 20). Even bigger problem is that I don't think it will solve the problem in 100% of cases, since when there is a great(er) load a remote this option may still not prevent the error.
I suppose that other workaround would be to decrease '--checkers', but it suffers from exactly the same problems as the previous workaround.
Finally, I thought to try increasing '--low-level-retries', but it doesn't seem that error 524 is retried regardless, so it won't help.
In other words, workarounds above are not good enough, and I am looking for a better way that guarantees that good files are not removed during sync.