Error 10043 occurs when uploading lots of files to R2

For Workers & Pages, what is the name of the domain?

api.cloud.capawesome.io

What is the error number?

10043

What is the error message?

Error: put: Please look at https://www.cloudflarestatus.com for issues or contact customer support. (10043)

What is the issue or error you’re encountering

Our customers upload several thousand files to Cloudflare R2 in just a few minutes. Unfortunately, this often leads to internal errors in R2.

What are the steps to reproduce the issue?

Create a worker and put a file to R2 using the following code:

try {
      // Put the file
      await context.env.BUCKET.put(appBundleFileId, body.file, options);
    } catch (error) {
      console.error(error);
      // Error: put: Please look at https://www.cloudflarestatus.com for issues or contact customer support. (10043)
    }

Invoke this code several thousand times in a few minutes. At some point, the following error is thrown:

Error: put: Please look at https://www.cloudflarestatus.com for issues or contact customer support. (10043)

However, on “https://www.cloudflarestatus.com” the status of R2 is operational. The problem has also been occurring for several weeks now.

Here is a requestId where this issue occured: 934b8f9128e207f2

Hello,

What is the error number?
10043

This error indicates that the source URL in a redirect exceeds the maximum allowed length.

Common causes

This error occurs when the source URL value of a URL redirect is too long. The maximum length of a source URL is 32,768 characters. Possible causes of this error are:

  • Dynamic URLs that contain excessive query parameters or tracking codes.
  • Unnecessary path segments or redundant subdirectories in the URL.

Resolution

You need to use a shorter URL as the source URL.

For further information, kindly review this related document : Cloudflare 10XXX errors · Cloudflare Support docs

Thank you ~ !

@harshinik Thank you for your answer! Which source URL do you mean?

As already mentioned, the error occurs when putting a file in R2:

try {
  // Put the file
  await context.env.BUCKET.put(appBundleFileId, body.file, options);
} catch (error) {
  console.error(error);
  // Error: put: Please look at https://www.cloudflarestatus.com for issues or contact customer support. (10043)
}

I only pass the following values to put(...):

  • appBundleFileId: This is a UUID.
  • body.file: A File instance.
  • options: An R2PutOptions object which contains just the sha256 property.

So there is no source URL or am I missing something?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.