Deployment builds sometimes fail with OOM after Gatsby 5 update

Current versus Expected behavior

After updating our website to Gatsby 5 we are randomly getting builds failing due to OOM errors. Sometimes timing out after 45 min, other times less. Some builds work fine. I’ve tried turning cache on and off, doesn’t appear to make any difference. There doesn’t appear to be any reason why some preview builds work and others fail. Local build works fine, and completes in a few minutes.

success Writing page-data.json and slice-data.json files to public directory - 0.136s - 307/307 2257.29/s
Error: Command "yarn build" exited with 129
▲ Build system report
▲ To always completely log this report, add VERCEL_BUILD_SYSTEM_REPORT=1 as an Environment Variable to your project.
• At least one "Out of Memory" ("OOM") event was detected during the build.

Code, configuration, and steps that reproduce this issue

Project information

Hi, @alisonjoseph! Welcome to the Vercel Community :smile:

We wrote a community post about how to troubleshoot these types of errors, could you take a look and let us know how you get on?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.