Open ispyinternet opened 2 months ago
Thank you for opening this issue! Does the heap out of memory error occur on the server side?
The edge-bundled
architecture handles all requests with Lambda@Edge.
Lambda@Edge has strict execution environment limits, and function memory size is limited to 128MB.
(see below)
https://github.com/jill64/sveltekit-adapter-aws/blob/main/docs/edge-bundled/README.md https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-lambda-at-edge
I've never used vite-plug-pwa
, but perhaps the edge-bundled
architecture can run out of memory.
This is a limitation of the AWS platform and there is no way around it.
Try choosing other architectures depending on your use case.
Hi, this is during build with vite, I know vite-plugin-pwa has to create a manifest for all the files to cache in the service worker - if that is somehow mixing into what your plugin does to create some recursive loop or something that is causing the heap to overflow 🤷
Understood. I will look into it.
Great, occasionally it does build, it's probably a project-size thing, so maybe try and clone a large sveltekit project to test against.
might be relevant: https://vite-pwa-org.netlify.app/frameworks/sveltekit#sveltekit-and-adapters
I tried to create a SvelteKit project with 6500 routes but could not reproduce the problem.
https://github.com/jill64/saa-issue-653
Is it possible for you to provide a repro?
I'm using vite-plug-pwa to setup service workers.
When I try to combine this plugin with sveltekit-adapter-aws ('edge-bundled'), I get a v8 JavasScript heap out of memory error. I can remove either plugin, and the project will build ok.
System: