Vercel Build out of memory

Alright, so, a few months ago, some of our updates would trigger this error, but only during development build. Then this week it happened more frequently, until this morning it spreaded into Production. Now we can't push any updates at all because of it. I wonder if anyone here has been through this? Our app is pretty huge and we tend to avoid third party dependencies as often as possible. We've already ran the profiler and identified a dependency that was extra large and we got rid of it, but still getting this error. My newest strategy now is to reduce the buddle size with some dynamic imports where it makes sense to. Are there any other suggestions?
No description
12 Replies
Neto
Neto•6mo ago
vercel offers 8GB of memory and 2/4 (free/pro) CPUs https://vercel.com/docs/deployments/troubleshoot-a-build#build-container-resources if you need more than that: pay enterprise or run on GHA GitHub actions are generally cheaper, and here some scripts to do it https://github.com/GentikSolm/gha-examples/tree/main/vercel_pscale
deforestor
deforestorOP•6mo ago
Hmm moving our whole infrastructure to GHA might not be viable now
Neto
Neto•6mo ago
you can send a ticket to vercel to get some help
deforestor
deforestorOP•6mo ago
Mhm that's what we're doing now. We might change to enterprise We might just have to do it, thanks!
Neto
Neto•6mo ago
GHA?
deforestor
deforestorOP•6mo ago
Yeah
Neto
Neto•6mo ago
being honest its the best way to scale builds for vercel lol
deforestor
deforestorOP•6mo ago
Is the idea to build locally and deploy to Vercel or to build on github?
Neto
Neto•6mo ago
build on GH more powerful machines and cheaper parallel builds
Juraj98
Juraj98•6mo ago
This is shot in a dark, but I once run into issues with memory during build, when we accidentally included files that were not supposed to be included in tailwind config. If you're using tailwind, maybe double check your content field in the config.
deforestor
deforestorOP•6mo ago
🤔 let me check Yeah there were js and ts files Included, I don't think that was necessary But I'm doubtful that will fix it
Jacob
Jacob•6mo ago
Something that might be causing this could be the amount of edge runtime pages / endpoints as i found that alot of these can make the build huge
Want results from more Discord servers?
Add your server