© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•8mo ago•
2 replies
felixnorden

Running out of memory in build step of SvelteKit App (Workers)

We're trying to build our SvelteKit-based app from our Monorepo (Turborepo) with Workers Builds, but are facing the typical Node OOM errors as we're seemingly hitting the 8GB limit inside the build step.

Running the same process with busted caches, mirrored commands and everything leads to ~4GB of used memory at the end of bundling the whole application on my local machine (Macbook Pro M1).

We haven't had this issue with our old builds with Pages, but wanted to move to the new builds and Workers runtime as it provides better logging out of the box and is now recommended on the CF dashboard.

Is there something that eats the other half that can't be removed, or are there some gotchas to be aware of when it comes to Workers Builds at this stage?

Below are the errors from the Node GC (fails towards the end of the Rollup process):

02:21:40.815    @mure/app:build: ----- Native stack trace -----
02:21:40.815    @mure/app:build: 
02:21:40.815    @mure/app:build:  1: 0xf1f241 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
02:21:40.815    @mure/app:build:  2: 0x13563a0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
02:21:40.815    @mure/app:build:  3: 0x135648f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
02:21:40.816    @mure/app:build:  4: 0x15ecad5  [node]
02:21:40.816    @mure/app:build:  5: 0x15ecb02  [node]
02:21:40.816    @mure/app:build:  6: 0x15ecdfa v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks) [node]
02:21:40.816    @mure/app:build:  7: 0x15fd31a  [node]
02:21:40.815    @mure/app:build: ----- Native stack trace -----
02:21:40.815    @mure/app:build: 
02:21:40.815    @mure/app:build:  1: 0xf1f241 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
02:21:40.815    @mure/app:build:  2: 0x13563a0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
02:21:40.815    @mure/app:build:  3: 0x135648f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
02:21:40.816    @mure/app:build:  4: 0x15ecad5  [node]
02:21:40.816    @mure/app:build:  5: 0x15ecb02  [node]
02:21:40.816    @mure/app:build:  6: 0x15ecdfa v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks) [node]
02:21:40.816    @mure/app:build:  7: 0x15fd31a  [node]
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

CF Workers always running out of memory
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3mo ago
Location of `wrangler.jsonc` file in sveltekit app on cloudflare workers.
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2mo ago
Sentry sourcemap upload causing workers to run out of memory on worker build
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
4mo ago
Getting JavaScript heap out of memory on build
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
6mo ago