Closed
Description
Describe the bug
Build hangs up and throws "Build took too long and was timed out"
It was working fine in 1.0.0-beta-4. Before 1.0.0 was released, I tried the main branch build and that too had the same error and I had to roll back. Seeing this again on the 1.0.0 build:
2025-05-06T14:49:30.465Z ⚙️ Bundling the OpenNext server...
2025-05-06T14:49:30.465Z
2025-05-06T14:49:33.298Z Applying code patches:
2025-05-06T14:49:33.300Z - patching require
2025-05-06T14:49:33.377Z - patching cacheHandler
2025-05-06T14:49:33.469Z - patching composableCache
2025-05-06T14:49:33.557Z - patching 'require(this.middlewareManifestPath)'
2025-05-06T14:49:33.668Z - patching `require.resolve` call
2025-05-06T14:49:33.675Z - patching `require.resolve composable cache` call
2025-05-06T14:49:33.779Z All 6 patches applied
2025-05-06T14:49:33.780Z
2025-05-06T14:49:34.040Z Worker saved in `.open-next/worker.js` 🚀
2025-05-06T14:49:34.044Z
2025-05-06T14:49:34.044Z OpenNext build complete.
2025-05-06T14:49:35.449Z
2025-05-06T14:49:35.449Z ┌──────────────────────────────┐
2025-05-06T14:49:35.449Z │ OpenNext — Cloudflare deploy │
2025-05-06T14:49:35.449Z └──────────────────────────────┘
2025-05-06T14:49:35.449Z
2025-05-06T14:49:35.599Z Monorepo detected at /opt/buildhome/repo
2025-05-06T14:49:35.602Z
2025-05-06T14:49:35.602Z Populating KV incremental cache...
2025-05-06T14:49:35.705Z ▲ [WARNING] You have defined bindings to the following internal Durable Objects:
2025-05-06T14:49:35.705Z
2025-05-06T14:49:35.706Z - {"name":"NEXT_CACHE_DO_QUEUE","class_name":"DOQueueHandler"}
2025-05-06T14:49:35.707Z These will not work in local development, but they should work in production.
2025-05-06T14:49:35.707Z
2025-05-06T14:49:35.708Z If you want to develop these locally, you can define your DO in a separate Worker, with a separate configuration file.
2025-05-06T14:49:35.708Z For detailed instructions, refer to the Durable Objects section here: https://developers.cloudflare.com/workers/wrangler/api#supported-bindings
2025-05-06T14:49:35.708Z
2025-05-06T14:49:35.708Z
2025-05-06T14:49:35.855Z workerd/server/server.c++:1942: warning: A DurableObjectNamespace in the config referenced the class "DOQueueHandler", but no such Durable Object class is exported from the worker. Please make sure the class name matches, it is exported, and the class extends 'DurableObject'. Attempts to call to this Durable Object class will fail at runtime, but historically this was not a startup-time error. Future versions of workerd may make this a startup-time error.
2025-05-06T14:49:36.232Z Inserting 3 assets to KV in chunks of 25
2025-05-06T14:49:38.957Z 100%|█████████████████████████████████████████████| 1/1 [00:00:<00:00:, 0.00it/s]
2025-05-06T14:49:38.957Z Successfully populated cache with 3 assets
2025-05-06T14:49:38.958Z
2025-05-06T14:49:38.958Z Creating D1 table if necessary...
2025-05-06T14:49:41.499Z
2025-05-06T14:49:41.500Z Successfully created D1 table
2025-05-06T14:49:42.986Z
2025-05-06T14:49:42.987Z Cloudflare collects anonymous telemetry about your usage of Wrangler. Learn more at https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler/telemetry.md
2025-05-06T14:49:43.028Z
2025-05-06T14:49:43.028Z ⛅️ wrangler 4.8.0 (update available 4.14.2)
2025-05-06T14:49:43.028Z --------------------------------------------
2025-05-06T14:49:43.028Z
2025-05-06T14:49:47.619Z 🌀 Building list of assets...
2025-05-06T14:49:47.678Z 🌀 Starting asset upload...
2025-05-06T14:49:48.838Z 🌀 Found 1 new or modified static asset to upload. Proceeding with upload...
2025-05-06T14:49:48.838Z + /BUILD_ID
2025-05-06T14:49:49.808Z Uploaded 1 of 1 assets
2025-05-06T14:49:49.808Z ✨ Success! Uploaded 1 file (39 already uploaded) (0.97 sec)
2025-05-06T14:49:49.808Z
2025-05-06T14:49:50.442Z Total Upload: 16907.68 KiB / gzip: 3011.83 KiB
2025-05-06T14:49:56.585Z Worker Startup Time: 20 ms
2025-05-06T14:49:56.586Z Your worker has access to the following bindings:
2025-05-06T14:49:56.586Z - Durable Objects:
2025-05-06T14:49:56.586Z - NEXT_CACHE_DO_QUEUE: DOQueueHandler
2025-05-06T14:49:56.586Z - KV Namespaces:
2025-05-06T14:49:56.587Z - NEXT_INC_CACHE_KV: <redacted>
2025-05-06T14:49:56.587Z - D1 Databases:
2025-05-06T14:49:56.587Z - NEXT_TAG_CACHE_D1: <redacted>
2025-05-06T14:49:56.587Z - R2 Buckets:
2025-05-06T14:49:56.587Z - NEXT_INC_CACHE_R2_BUCKET: <redacted>
2025-05-06T14:49:56.587Z - Services:
2025-05-06T14:49:56.587Z - WORKER_SELF_REFERENCE: <redacted>
2025-05-06T14:49:56.587Z - Assets:
2025-05-06T14:49:56.587Z - Binding: ASSETS
2025-05-06T14:49:56.608Z Uploaded <redacted> (12.88 sec)
2025-05-06T14:49:57.125Z Deployed <redacted> triggers (0.14 sec)
2025-05-06T14:49:57.125Z https://<redacted>.workers.dev
2025-05-06T14:49:57.126Z Current Version ID: 0283cf21-7248-4f9c-8d89-eff601bd031c
Build took too long and was timed out
I think the code is properly deployed though. I can see it appearing in the versions history in deployment log. But the build still hangs up.
Steps to reproduce
- Upgrade to version 1.0.0
- Deploy to CF workers
Expected behavior
Build completes properly
@opennextjs/cloudflare version
1.0.0
Wrangler version
4.12.2
next info output
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041
Available memory (MB): 49152
Available CPU cores: 14
Binaries:
Node: 23.5.0
npm: 10.9.2
Yarn: 1.22.22
pnpm: 9.15.1
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: N/A
Next.js Config:
output: N/A
Additional context
No response