Home
Support Forums

Gatsby v4 works locally, but timed out on Netlify

hey team,

I finally managed to migrate my current repo to Gatsby v4 and it compiles locally, but times out on Netlify. I‘ve tried a couple of suggestions I‘ve found on Google:

So far nothing works. Here‘s the Netlify deploy build log.

Is it because gastby v4 is not officially supported yet or I am missing something important? Any pointer or suggestion is greatly appreciated, thank you!

I’m also seeing this same issue. The build times out no the Building production JavaScript and CSS bundles step with this message:

success run queries in workers - 438.798s - 1795/1795 4.09/s
8:00:06 AM: error UNHANDLED EXCEPTION write EPIPE
8:00:06 AM: 
8:00:06 AM: 
8:00:06 AM:   Error: write EPIPE
8:00:06 AM:   
8:00:06 AM:   - child_process.js:841 ChildProcess.target._send
8:00:06 AM:     internal/child_process.js:841:20
8:00:06 AM:   
8:00:06 AM:   - child_process.js:712 ChildProcess.target.send
8:00:06 AM:     internal/child_process.js:712:19
8:00:06 AM:   
8:00:06 AM:   - index.js:290 WorkerPool.sendMessage
8:00:06 AM:     [site]/[gatsby-worker]/dist/index.js:290:19
8:00:06 AM:   
8:00:06 AM:   - worker-messaging.ts:22 
8:00:06 AM:     [site]/[gatsby]/src/utils/jobs/worker-messaging.ts:22:22
8:00:06 AM:   
8:00:06 AM: 
8:00:06 AM: not finished Merge worker state - 0.260s
8:00:06 AM: 

The Gatsby team fixed the issue in build #4.0.1. That version works for me locally but times out on Netlify:

seems like so many things are still not working with v4 especially the ones with community plugins :man_shrugging:

hi there @ajmalafif - sorry to hear that there are still some rough edges. Please do keep continuing to file issues - that is the best way for the team that works on these specific things to learn about bugs you are experiencing so they can work on them efficiently! thank you.

I’m happy to file an issue and logs. Where do you want it to be reported?

here please! if it seems like its an issue with our plugin:

I’m seeing this same ‘write EPIPE’ error, referenced here with Gatsby (they should probably close this issue, I only responded there as it was the first place I saw it):

You’ll see in my comment there, I validated a theory posted that this is a memory or timeout issue.

If I drastically reduce the static content of my site, Netlify deploys it just fine.

Can someone at Netlify try bumping up my build timeout and/or memory limit?

My Netlify instance title is amazing-wiles-1918a6 :slight_smile:

Unfortunately, memory limit cannot be changed. We can bump the build time, but since it’s not a build time issue, I don’t see the benefit in doing this.

This might shed more info:

Maybe you can just bump my build time for now? You can see in my deploy history I have successful vs. unsuccessful deploys with V4 – maybe there is a log to check for memory usage differences.

I’ll also work on trying to pull down the Netlify docker image and checking memory usage myself.

Sure, the time limit has been bumped to 30 mins for now.

Unfortunately, we don’t log the build memory usage yet, so we don’t have that data.

So I went through the process for the first time of using Netlify’s build-image as @hrishikesh suggested.

It took a little bit of work and I ran into a bug where the submodule for all of my static assets wasn’t pulling down properly (Submodules do not get copied on cloning to container · Issue #444 · netlify/build-image · GitHub), but upon manually copying into assets to the build image volume in the right folder, I was able to start building my app.

With the default memory limit of 3GB, I seem to get the same write EPIPE error and my build fails (good, I reproduced it!).

I then bumped by Docker memory limit to 4GB and… the build succeeds.

I guess the question now is deciding how I move forward if the 3GB limit for Netlify builds cannot be changed :pensive: