UNHANDLED EXCEPTION write EPIP with Gatsby build

I noticed that I have been having issues deploying one of my gatsby sites lately.

The site builds without errors locally, but when I try to deploy to netlify, it fails with an error msg

“error UNHANDLED EXCEPTION write EPIPE”

The only thing I did was to update gatsby and its dependencies from 4.8 to 4.8.1. Everything was fine prior to this update. I’m not sure what triggered the error in ver 4.8.1 that ver 4.8 didn’t have? Is it the memory usage?

The site name is tng.netlify.app

Chances are this is because of a memory increase in your build. Netlify limits you to 3GB, and Gatsby v4 seems to hit it. I’ve been able to try and work around this by removing chunks of static content on my site, but it looks like I’m going to be forced to move off as it’s been stated by Netlify this limit cannot increase.

Yeah I thought about the possibility this might be a memory-related issue, but what I don’t understand is that everything was building fine before I updated Gatsby deps from v 4.8 to v 4.8.1 and there’s no new content added to the site either. It would be great if there’s a way to check the memory usage in the log.

1 Like

I wonder if something changed on the Netlify end. I am struggling to get my app to build right now :frowning:

This was actually a Gatsby 4.8 fix to reduce memory usage that I was hoping would help me get my site to deploy…no luck tonight though.

hi there, sorry to hear you are struggling with this.

could you take a look at this issue and see if it describes what you are encountering?

1 Like

Thanks for sharing this one. I did go ahead and revert back to an older version of Gatsby by forcing it to =v4.1.3 in my package.json.

Site is now deploying again.

2 Likes

thank you - that is helpful feedback!

1 Like

FWIW - This also resolved the issue for me.

3 Likes

Thank you for the reply. Yeah, it is a similar issue. I ended up force downgrading to v 4.8, which fixed the problem for now.

1 Like

Thank you both for sharing!

Tried changing the gatsby version to both 4.1.3 and 4.8. Did not solve the issue for me. :neutral_face:

Still having issues, cannot deploy automatically to Netlify anymore. :face_with_diagonal_mouth:

But: I installed the netlify-cli and build and deployed from my own machine, that works…

I’m having the same issue on a relatively small blog type site I administer for a friend that uses NetlifyCMS, Gatsby and builds and deploys on Netlify.

It’s fine on v4.6.2 but the build fails every time when updated to v4.9.2.

I’ve added my details to an open Gatsby Github issue:

Sticking with v4.6.2 for now.

1 Like

thank you, i hope the gatsby folks can take a look at this soon :grimacing:

I’m having same problem today (3/12/2022).
Gatsby CLI 4.9.1, Gatsby 4.9.3.
Just upgraded from v3 (which I built and deployed earlier today).
V3 and V4 build fine on my machine.
I DO NOT have any Netlify packages explicitly in my package.json, but that was never a problem before.
I’m about to try adding GATSBY_CONCURRENT_DOWNLOAD to 16 in the Netlify env vars.

GATSBY_CONCURRENT_DOWNLOAD to 16 in Netlify Env vars did not work either.
BTW, ran with Retry Deploy, Clear Cache

@j-e-clark Thanks! Rolled back to v4.6.2 and it works now.
I removed the netlify env var: GATSBY_CONCURRENT_DOWNLOAD to 16 before build.
package.json:
“gatsby”: “4.6.2”,
“gatsby-cli”: “^4.0.0”,

Thanks so much for updating this thread and sharing your solution! It is very beneficial for future members who encounter the same error, so we appreciate it!

Happy building :rocket:

guys, a few days ago I updated from gatsby from gatsby 4.7.2 to 4.9.1 without any issue, only sometimes I had the EPIPE error but after redeploying it was resolved, but today almost every deploy fails! So I tried almost everything:
adding GATSBY_CONCURRENT_DOWNLOAD variable to 16
GATSBY_CPU_COUNT to 1
optimizing images
disabling WEBP
Rolled back to 4.7.2

Any ideas? something bad is going on today with netlify?

Hey there, @npg :wave:

Thanks for reaching out! Sorry to hear you are experiencing difficulties.

When you say you have tried optimizing images, can you elaborate on that? My first thoughts here would be checking your source images to see if you can reduce their size. Have you addressed the size of source images yet?

hey @npg ,
Were you able to get this issue resolved? I’m facing the same issue. Tried everything but nothing seems to work.