Skip to content

Can't upload R2 incremental cache - recurring 503 Service Unavailable #12413

Closed

Description

@grabmateusz

What versions & operating system are you using?

We have a project, when with wrangler 4.42.2 and @opennextjs/cloudflare version: 1.11.0 we're able to bulk upload R2 incremental cache containing over 17k assets on regular basis. The logs looks as follows:

Populating R2 incremental cache...
Populating remote R2 incremental cache using batch upload...
Using batch upload with R2 credentials from environment variables
Successfully uploaded 17126 assets to R2 using batch upload

Now we would like to update to newest Wrangler and OpenNext, but it seems OpenNext changed the way of bulk uploading R2 cache, which is again error prone. In our logs we can see:

Resource location: remote 
Starting bulk upload of 16974 objects to bucket <bucket> using a concurrency of 50
Uploaded 0% (10 out of 16,974)
Uploaded 0% (20 out of 16,974)

and in the end:

Uploaded 21% (3,720 out of 16,974)
Uploaded 21% (3,730 out of 16,974)
▲ [WARNING] 🚧 `wrangler r2 bulk put` is an experimental command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose
▲ [WARNING] Processing wrangler.jsonc configuration:
    - Unexpected fields found in top-level field: ""
✘ [ERROR] Error uploading "<path>"
  Error: Failed to fetch <url>.fetch - 503: Service Unavailable);

In the end it is impossible to upload R2 incremental cache and in the end our deployment fails.

Please provide a link to a minimal reproduction

Any Next.js project with huge number of ISRed pages

Describe the Bug

Regression on R2 bulk update

Please provide any relevant error logs

Uploaded 21% (3,720 out of 16,974)
Uploaded 21% (3,730 out of 16,974)
▲ [WARNING] 🚧 wrangler r2 bulk put is an experimental command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose
▲ [WARNING] Processing wrangler.jsonc configuration:
- Unexpected fields found in top-level field: ""
✘ [ERROR] Error uploading ""
Error: Failed to fetch .fetch - 503: Service Unavailable);

Activity

  1. added theissue type on Feb 4, 2026
  2. moved this from Untriaged to Done in workers-sdkon Feb 4, 2026
  3. itsaakashpatel commented on Feb 23, 2026

    @itsaakashpatel

    @grabmateusz @vicb Did it resolve for you? I'm kinda stuck here, and not sure what to do. I'm on the latest version of both packages. Thanks!

  4. vicb commented on Feb 23, 2026

    @vicb
    Contributor

    Please use the Open Next repo for Open Next issues instead of this one

    This PR should solve the problem. I was out last week but @grabmateusz is helping figuring out some issue and I hope it can land during the second part of this week.

  5. grabmateusz commented on Feb 23, 2026

    @grabmateusz
    Author

    @itsaakashpatel as @vicb wrote, this bug was improperly raised, I've created proper one as opennextjs/opennextjs-cloudflare#1110 + I am supporting @vicb with opennextjs/opennextjs-cloudflare#1121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions