Skip to content

[BUG] R2/KV Incrememental cache doesn't work when prerendering a large number of routes #637

@maamokun

Description

@maamokun

Describe the bug

When I deploy an app using OpenNext Cloudflare that has uses ISR with a large number of prerendered routes (in my case around 300) the builds always get stuck at the "populating (R2/KV) incremental cache..."stage until the builds eventually time out. The same app works as expected when using the Static Assets caching method, however I cannot revalidate pages using that method.

Steps to reproduce

  • Create a page in a Next.js app that uses ISR, with a large number of prerendered routes
  • Set up either R2 or KV incremental caching
  • Deploy the app using Workers Builds

Expected behavior

App deploying successfully with routes prerendered

@opennextjs/cloudflare version

1.0.0-beta.4

Wrangler version

4.14.1

next info output

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 65464
  Available CPU cores: 16
Binaries:
  Node: 22.15.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 9.4.0
Relevant Packages:
  next: 15.3.1 // Latest available version is detected (15.3.1).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions