Skip to content

[BUG] Slow Wrangler file by file cache populating #866

@grabmateusz

Description

@grabmateusz

Describe the bug

Hi,
we're using @opennextjs/cloudflare in version 1.6.5.
We have ISR enabled and we use R2 for incremental cache.
During deployment we deploy ~500 items to the cache and there are 2 issues:

  • it takes over 20 minutes,
  • sometimes it randomly crashes on 500 / 502 HTTP response code during deploy.
    Is there any way to speed up deployment process?

Steps to reproduce

  1. Create a Next.js app with ISR, add multiple HTTP response code to render process of pages that are subject of ISR
  2. Deploy such OpenNext worker to Cloudflare using opennextjs-cloudflare deploy command

Expected behavior

  1. Deployment time should be reduced
  2. Deployment should be deterministic and do not randomly fail in the middle

@opennextjs/cloudflare version

1.6.5

Wrangler version

4.33.1

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.19.2
  npm: 10.8.2
  Yarn: 1.22.21
  pnpm: 10.15.0
Relevant Packages:
  next: 15.3.4 // There is a newer version (15.5.2) available, upgrade recommended! 
  eslint-config-next: 14.1.0
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.3.3
Next.js Config:
  output: N/A
 ⚠ There is a newer version (15.5.2) available, upgrade recommended! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions