A Cloudflare R2 bucket upload timeout can interrupt a file transfer before it finishes, causing failed uploads, stalled progress or errors such as Read timeout and Connection timeout. The problem may affect uploads through the Cloudflare dashboard, AWS CLI, S3-compatible applications or custom websites.
The quickest way to identify the problem is to upload a small file to the same bucket using the same method. If the smaller file works but the original fails, investigate upload limits, multipart transfers and client timeouts. If every upload fails, check the connection and exact error before changing other settings.
Step 1: Identify the Failure
Start by determining where the upload stops and what error appears. A connection that fails immediately requires different troubleshooting from an upload that transfers most of its data before timing out.
For uploads through the Cloudflare dashboard:
Sign in to your Cloudflare account.
Open R2 Object Storage.
Select the affected bucket.
Click Upload and choose the original file.
Record whether the upload fails immediately, stops during transfer or hangs near completion.
If you upload through a website, press F12 to open your browser's Developer Tools. Select the Network tab, repeat the upload and inspect the failed request's HTTP status, response and duration.
For AWS CLI uploads, copy the exact terminal error. Do not change configuration settings until you know whether the request is failing because of a timeout, authorization problem or size restriction.
Next action: If the error is 403, check permissions in Step 3. If the upload times out without a clear HTTP error, continue with the small-file test.
Step 2: Test a Small Upload
Create a text file named r2-timeout-test.txt containing a few words. Upload it to the same R2 bucket using the method that failed with your original file.
For dashboard uploads, select the test file and check whether Cloudflare confirms successful completion. If you already use AWS CLI with an R2 profile, run:
aws s3 cp ./r2-timeout-test.txt s3://YOUR_BUCKET/r2-timeout-test.txt --endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com --profile r2
Replace YOUR_BUCKET with your bucket name and ACCOUNT_ID with your Cloudflare account ID. The --profile r2 option assumes that you have already configured a dedicated AWS CLI profile for R2.
If the Small File Works
Try another file that is larger than the text file but smaller than the original upload. If both smaller files succeed while the original consistently times out, proceed to Step 4 to check the upload method and file-size restrictions.
If the Small File Fails
Check whether the request returns an authorization error or cannot establish a connection. Continue to Step 3 to verify the endpoint, credentials and bucket permissions before investigating large-file transfers.
Step 3: Check the Connection
An incorrect endpoint, expired credentials or insufficient bucket permissions can prevent uploads from working. These problems should be resolved before increasing timeouts or enabling multipart transfers.
For AWS CLI and S3-compatible clients, verify the following configuration:
| Setting | Required value |
|---|---|
| Endpoint | https://ACCOUNT_ID.r2.cloudflarestorage.com |
| Region | auto |
| Bucket | Your existing R2 bucket name |
| Access Key ID | Valid R2 access key |
| Secret Access Key | Matching R2 secret key |
| Permissions | Object Read & Write access |
Cloudflare R2 uses an S3-compatible API endpoint associated with your Cloudflare account. Standard Amazon S3 endpoints should not be substituted for the R2 endpoint.
Configure AWS CLI
If your R2 profile is missing or incorrectly configured, open a terminal and run:
aws configure --profile r2
Enter the R2 Access Key ID and Secret Access Key when prompted. Set the default region to auto and choose json for the output format.
You can create or review R2 credentials in the Cloudflare dashboard under R2 Object Storage → Manage R2 API tokens. Confirm that the credentials allow writing to the affected bucket and never expose the secret access key in public logs.
After correcting the configuration, repeat the small-file upload from Step 2. If it succeeds, retry the original file; if larger files still fail, continue to Step 4.
Step 4: Check Upload Limits
Cloudflare R2 supports large files but different upload methods have different restrictions. An upload can fail because the selected tool or application can not handle the file size, even when the R2 bucket has sufficient storage capacity.
Cloudflare documents these relevant limits:
| Upload method | Maximum upload size |
|---|---|
| Single-part upload | 5 GiB |
| Multipart upload | 4.995 TiB |
Wrangler r2 object put | 315 MB |
| Individual multipart part | 5 GiB |
Multipart uploads require each part, except the final part, to be at least 5 MiB. An upload can contain up to 10,000 parts and all non-final parts must have the same size.
What to Change
Check the original file size and identify which upload method your application uses. If you are using Wrangler to upload a file larger than its supported limit, switch to AWS CLI, rclone or another suitable S3-compatible client.
If you are using a single-request upload for a particularly large file, move to multipart uploading in Step 5. If the original file is small and comfortably within the relevant limit, proceed to Step 6 instead.
Step 5: Use Multipart Uploads
Large files may repeatedly fail when transferred through a single request, especially over unreliable connections. Multipart uploading divides a file into smaller parts so individual failed transfers can be retried without necessarily restarting the complete upload.
AWS CLI automatically uses multipart transfers for files exceeding its configured multipart threshold. You can test the original file using the following command:
aws s3 cp ./large-file.zip s3://YOUR_BUCKET/large-file-test.zip --endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com --profile r2
Replace large-file.zip with the actual filename. The example uses large-file-test.zip as the destination object key to avoid accidentally overwriting an existing object.
Wait until AWS CLI reports successful completion. If the upload finishes, verify the stored object in Step 7 before treating the timeout as resolved.
If Multipart Uploading Fails
Retry once and observe whether the same transfer part fails or whether the failure occurs at different points. Repeated failures at different stages may indicate connection instability, while errors during multipart completion require examining the uploaded parts and completion request.
If your application reports InvalidPart, verify that all required parts were uploaded and that the completion request uses their correct ETags. For NoSuchUpload, check whether the upload was aborted, expired or referenced using an incorrect upload ID.
Cloudflare documents these as multipart-specific failures. They can not be repaired simply by increasing the client timeout.
Step 6: Adjust the Timeout
If smaller uploads work and the original file transfers data before AWS CLI reports a read timeout, check the client's timeout settings. An insufficient waiting period can interrupt an otherwise functioning operation.
AWS CLI provides two relevant settings:
--cli-connect-timeout: Controls how long the client waits to establish a socket connection.--cli-read-timeout: Controls how long the client waits for socket data during an operation.
Both settings default to 60 seconds. Increasing the read timeout allows a longer wait for data, but it does not remove Cloudflare's upload-size restrictions or guarantee that an unstable connection will succeed.
Try a Longer Read Timeout
Run the upload again using these diagnostic settings:
aws s3 cp ./large-file.zip s3://YOUR_BUCKET/large-file-test.zip --endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com --profile r2 --cli-connect-timeout 30 --cli-read-timeout 180
This example increases the socket read timeout to 180 seconds and sets the connection timeout to 30 seconds. The values are intended for troubleshooting rather than as permanent recommendations for every application.
If the upload succeeds, repeat the test to confirm consistent behaviour. If the same error returns, investigate network reliability before increasing the timeout further.
Check the Network
An unstable internet connection, VPN or proxy can interrupt uploads even when the R2 endpoint and credentials are correct. Test the same file under comparable conditions using another reliable connection.
You can narrow down the problem by:
Temporarily disconnecting unnecessary VPN or proxy services.
Pausing other large uploads and downloads.
Retrying the same upload without changing its settings.
Testing another reliable network if the timeout continues.
Comparing the failure timing and error messages.
If the upload succeeds consistently through another network, investigate the original connection. If different networks produce the same error, examine the application's upload route or the response returned by R2.
Step 7: Check Browser Uploads
If AWS CLI uploads succeed but uploads through your website continue failing, the problem may involve the application's browser upload process. Check whether the browser sends the file directly to R2 or passes it through your server or Cloudflare Worker.
Open Developer Tools, select Network and repeat the failed upload. Inspect the request URL, HTTP method, status code and response to identify which component rejected the transfer.
Fix CORS Errors
Browser uploads using presigned URLs require a suitable CORS policy on the R2 bucket. The policy must allow your website's origin, the upload method and the headers sent with the request.
Check these settings:
AllowedOrigins: Include your website's exact origin.
AllowedMethods: Include
PUTwhen using presigned PUT uploads.AllowedHeaders: Include headers sent by the browser, such as
Content-Type.Presigned URL: Confirm that the signature has not expired.
If the browser reports a signature mismatch, verify that the request uses the expected HTTP method and signed headers. For example, changing a signed Content-Type value can invalidate the request.
Cloudflare documents CORS configuration and matching signed headers as requirements for browser-based presigned URL uploads.
Check Worker Limits
If files pass through a Cloudflare Worker before reaching R2, the incoming request may be restricted by the Cloudflare plan associated with your domain.
The documented incoming request limits include:
| Cloudflare plan | Request body limit |
|---|---|
| Free | 100 MB |
| Pro | 100 MB |
| Business | 200 MB |
| Enterprise | Up to 5 GB with self-service configuration |
A request exceeding the applicable limit can return HTTP 413. This is a request-size failure rather than an ordinary client read timeout.
For larger browser uploads, consider generating a presigned URL securely on your server and sending the file directly to R2. Files that require multipart transfers should use an appropriate multipart upload implementation rather than relying on a single PUT request.
Step 8: Verify the Upload
After applying a successful fix, confirm that the object actually exists in the intended bucket. An upload progress indicator reaching 100% does not always establish that the final operation completed successfully.
If you uploaded large-file-test.zip with AWS CLI, run:
aws s3api head-object --bucket YOUR_BUCKET --key large-file-test.zip --endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.com --profile r2
If the command succeeds, inspect the returned ContentLength value and compare it with the original file size. A matching size is useful but it does not independently prove that every byte is correct.
For stronger verification, download the uploaded object and compare its checksum with the original file. If both files match and repeated uploads complete successfully, the original timeout is no longer reproducible under those test conditions.
If the Object Is Missing
If the head-object request returns NoSuchKey, confirm that the upload used the expected bucket and object key. A missing object after an unsuccessful upload means that the transfer has not been verified as complete.
For multipart uploads, inspect whether completion failed or the upload was aborted. Correct the reported multipart error before attempting another complete transfer.
If It Still Fails
If the upload continues failing after the relevant troubleshooting steps, use the exact error to determine what should happen next. Avoid repeatedly increasing timeout values when the response indicates a different problem.
| Error | Next action |
|---|---|
Read timeout | Test a longer read timeout and another network. |
Connection timeout | Check endpoint connectivity, DNS, VPN and proxy settings. |
403 AccessDenied | Correct bucket permissions or API credentials. |
403 SignatureDoesNotMatch | Check signed headers, credentials and request signing. |
413 Request Entity Too Large | Check the upload route's size limit and switch methods. |
429 Too Many Requests | Reduce write frequency to the same object key and retry with backoff. |
400 IncompleteBody | Check whether the connection or client terminated the transfer early. |
400 InvalidPart | Verify the multipart upload's parts and ETags. |
404 NoSuchUpload | Check the upload ID and whether the multipart upload expired or was aborted. |
503 Service Unavailable | Retry with exponential backoff and check Cloudflare's service status. |
These errors have different meanings in Cloudflare R2's documented response system. In particular, rate limiting, incomplete request bodies, multipart completion failures and temporary service unavailability require different remedies.
When Nothing Works
If uploads fail through multiple clients and reliable networks, check the Cloudflare Status page for an active R2 incident. If no relevant incident explains the failure, gather the information needed to reproduce the issue.
Prepare the following details for Cloudflare support:
Bucket name and affected object key.
Upload method and application version.
Original file size and approximate failure time.
Exact error message and HTTP status.
Whether small files upload successfully.
Whether multipart transfers were attempted.
Whether the failure occurs across different networks.
Include relevant request identifiers when available but remove secret keys, authorization headers and active presigned URLs from any shared logs. This information helps support investigate the failing operation without requiring access to your credentials.
If support confirms a service-side problem, follow the recommended correction and repeat the original upload. If the failure can not be reproduced outside your application, focus further investigation on its request handling, network configuration and upload implementation.
Final Thoughts
A Cloudflare R2 bucket upload timeout is best resolved by identifying the failed operation before changing configuration settings. Begin with a small-file test, verify the connection and check whether the original upload requires multipart transfers or a longer client read timeout.
When these changes do not resolve the problem, inspect the exact HTTP error and the application's upload route. Confirm that the uploaded object exists and matches the original file before considering the problem fixed.


