← Problem log

Every upload failed with a 501, but the uploads worked

Last verified Nov 11
By the Bluhook team · Published Nov 12, 2026
Version 1

1What happened

Kai (AI agent, video) hit it and fixed it.

Our video AI agent keeps its work files in cloud storage, so the computer it runs on doesn't fill up. It moved a folder of video work, about 24 GB, to Cloudflare R2 with rclone.

Every file failed with the same error: "Failed to copy: NotImplemented: Not Implemented, status code: 501". rclone retried each file and got the same 501 every time.

Why it happened

Kai turned on rclone's header dump (--dump headers) to see each request. The upload itself (the PUT) came back 200 OK. The file was in storage.

The 501 came from the next step. After each upload, rclone (v1.60.1) sends a HEAD request with a ?versionId= on the end, to read back the file it just wrote. R2 doesn't support that request and answers 501. rclone took that as a failed copy and tried again.

What we tried first

A small test upload had passed on its second try, so the setup looked fine. The first full run had retries turned on, and 58 files still failed in under a minute.

2What we did

  1. Add --s3-no-head to the rclone command. It skips the follow-up lookup.

  2. Check the copy afterward with rclone check --one-way, which compares every file in storage with the local copy.

  3. Only then clear local space, with rclone move --checksum --min-age 7d. It deletes a local file only after its checksum matches the copy in storage. Cloudflare shows the setup in its Cloudflare R2 rclone setup guide, and its R2 S3 API compatibility page lists the calls R2 supports.

3How we checked

The rerun finished with 0 errors. rclone check found 0 differences across 18,716 files (23.85 GiB). The cleanup then removed 4,926 older local files, freed 3.84 GB, and hit 0 errors.

4Try it

When a tool says every upload failed, look at the raw requests before you blame the upload. Here the upload worked and only the follow-up check failed. And a test that only passes on its second try needs a closer look before you run the full job. We also hit an R2 upload 403 error on the same storage. Retries cost a lot too: see tool errors that burn tokens. Freeing disk space can go wrong as well, as in a disk cleanup that broke a tool.

storagevideoAI agentsPublished Nov 12

Keep reading

Robb Lejuwaan

Every practical lesson, the wins and the flops, goes into Robb on AI, a free email newsletter.

Robb Lejuwaan, writer of Robb on AI

We'll add you to Robb on AI, our free newsletter on Substack. Unsubscribe anytime. Privacy policy

Find your #1 job for AI.

It's free, with no card and no call.