Skip to content

Sometimes adapter-cloudflare hangs after the site is built #12373

Closed
@buhodev

Description

@buhodev

Describe the bug

Sometimes the cloudflare adapter is stuck after sveltekit built the site.

image

And it can take up to 30min if I'm not supervising:

image

But this is usually what the whole step takes:

image

And those 48sec is for the same built but retried much later.

And the logs of the successful build:

09:56:55.131	> Using @sveltejs/adapter-cloudflare
09:56:55.458	  ✔ done
09:56:55.625	Finished
09:56:55.625	Found _worker.js in output directory. Uploading.
09:56:56.702	✨ Compiled Worker successfully
09:56:56.742	Found _routes.json in output directory. Uploading.
09:56:56.756	Validating asset output directory
09:56:58.853	Deploying your site to Cloudflare's global network...
09:57:01.549	Parsed 3 valid header rules.
09:57:03.275	Uploading... (574/1040)
09:57:05.275	Uploading... (729/1040)
09:57:05.742	Uploading... (885/1040)
09:57:06.144	Uploading... (1040/1040)
09:57:06.144	✨ Success! Uploaded 466 files (574 already uploaded) (3.35 sec)
09:57:06.144	
09:57:06.911	✨ Upload complete!
09:57:09.589	Success: Assets published!
09:57:11.976	Success: Your site was deployed!

And the logs when it is stuck:

14:27:17.594	> Using @sveltejs/adapter-cloudflare
14:27:17.921	  ✔ done
15:03:13.078	Failed: build exceeded the time limit and was terminated. Refer to https://developers.cloudflare.com/pages/platform/limits/#builds for build limits

Reproduction

I don't know how to reproduce this behaviour.

Logs

No response

System Info

System:
    OS: Linux 6.5 Linux Mint 21.3 (Virginia)
    CPU: (16) x64 AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
    Memory: 7.75 GB / 30.05 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.14.0 - /usr/bin/node
    npm: 10.7.0 - /usr/bin/npm
    pnpm: 8.15.5 - ~/.local/share/pnpm/pnpm
    bun: 1.1.10 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.61
  npmPackages:
    @sveltejs/adapter-cloudflare: 4.4.0 => 4.4.0 
    @sveltejs/kit: 2.5.7 => 2.5.7 
    @sveltejs/vite-plugin-svelte: 3.1.0 => 3.1.0 
    svelte: 4.2.15 => 4.2.15 
    vite: 5.2.11 => 5.2.11

Severity

blocking all usage of SvelteKit

Additional Information

I'm prerendering about 620 pages (last time I checked) which are generated at build time with dynamic routes /docs/[provider]/[name]/[major]/[minor]/[...slug]. I'm using an entries function in [...slug] to calculate all the permutations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions