AnomalyInnovations / serverless-bundle

Optimized packages for ES6 and TypeScript Node.js Lambda functions without any configuration.
https://serverless-stack.com/chapters/package-lambdas-with-serverless-bundle.html
MIT License
537 stars 157 forks source link

Out of memory issues #205

Open jayair opened 3 years ago

jayair commented 3 years ago

It seems like quite a few people are having out of memory errors with serverless-bundle. We're seeing many of these on Seed. It seems like a lot of it is for TS projects with functions being packaged individually and the type checkers that are spawned. But I think there are some JS ones as well.

I've started recommending serverless-esbuild. But I could use some help figuring out what the issue is, so we can fix it here.

louisholley commented 3 years ago

just a bump to say this is affecting us - will check out serverless-esbuild thank you @jayair

ADrejta commented 3 years ago

@jayair The serverless-wepack plugin also had this issue and they fixed it by passing a concurrency number to limit the number of parallel packaging and type checking.

Since serverless-bundle uses serverless-webpack checkout this pull request that was made to the serverless-webpack repo. Maybe you could use their implementation to fix this issue.