Build Fails with ENOSPC (No Space Left on Device) During Gatsby Cache Copy

Issue Description:
Our Netlify production builds are failing consistently with an ENOSPC error during the Essential Gatsby plugin’s post-build cache copy step. The Gatsby build completes successfully (~55-56 minutes), but the deploy fails when the plugin tries to copy the public folder to the build cache.

**Error Details:
**
Plugin “@netlify/plugin-gatsby” internal error
CpyError: Cannot copy from public/... to /opt/build/cache/cwd/public/...:
Cannot create directory: ENOSPC: no space left on device, mkdir ‘…’
Error location: In “onPostBuild” event in “@netlify/plugin-gatsby”

Build Configuration:

  • Node.js: 14.21.3

  • Gatsby: 4.25.7

  • @netlify/plugin-gatsby: 3.3.0 (auto-installed, not manually configured)

  • Build time: 55-56 minutes for full build, 10-15 minutes for incremental

  • Site type: Gatsby 4 with WordPress data source, Elasticsearch, Algolia

  • Build command: yarn build with GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true

Troubleshooting Attempted:

  1. Cleared build cache multiple times

  2. Confirmed only one build runs at a time (no concurrent builds)

  3. Upgraded Node to 14.21.3 (from 14.17.0)

  4. Added SHARP_IGNORE_GLOBAL_LIBVIPS=1 to resolve earlier sharp compilation issue

Current Workaround:
We’ve disabled the Essential Gatsby plugin with NETLIFY_SKIP_GATSBY_BUILD_PLUGIN=true to allow builds to complete without cache, but this means slower subsequent builds.

Questions:

  1. What is the current disk space limit for build caches on Netlify during the post-build phase?

  2. Are there known issues with the plugin’s cache copy behavior on large Gatsby sites?

  3. Is there a recommended way to handle builds with large public folders (our site generates thousands of static pages)?

Any guidance would be appreciated.

What site is this about?

It is a gatsby site, running with wordpress as CMS. Herb.co let me know if I should share any further details with you.

I’ve bumped your build storage, so the issue should now be resolved.

Hi the issue have been resolved. appreciate your help. can you tell me how much was the build storage previously and how much is it now?

It was 50 GB before, bumped to 100.