Gatsby site deployment fails with error UNHANDLED EXCEPTION write EPIPE

Hello!
I’m having trouble deploying my site. After hours of searching the forums, I still can’t figure this thing out. I’m still a webdev noob so bear with me.

Things I’ve tried:
changed build command to ‘CI= npm run build’ add environment variable ‘CI’ with the value ‘false’

tried to redeploy with cleared cache.

updated gatsby and all packages

site name: frosty-euclid-1cd7d1

repo: https://github.com/wilderav86/Portfolio

here is the full deployment log: Netlify App

Thanks!

3 Likes

I am encountering the same exact error at the same exact point the build (right after Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs)

1 Like

Same here!

4:30:21 PM: success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 443.293s - 577/577 1.30/s
4:30:22 PM: error UNHANDLED EXCEPTION write EPIPE

It’s a bit of a gamble…sometimes it works, most of the time it doesn’t.

Solved the issue by reverting back to gatsby version 4.7.2

‘npm install gatsby@4.7.2’

Hope this works for you guys!

2 Likes

Thanks for coming back and sharing, @wilderav86. happy building :rocket:

1 Like

I face the same issue. Reverting back to an old version can’t’n be a solution. Could be a temporary work around. Any news on this?

Hey there, @don-esteban :wave:

Apologies for the delay here. Can you please share the site that is impacted by this, as well as your most recent deploy log? Additionally, what version of Gatsby are you using? Thanks so much.

Hi @hillary,

see Gatsby app deployment fails. Local build works for details. The answer there is not satisfying. Meanwhile, I understand this must be some resource related issue. Probably I should optimize some queries. Removing about 500 documents (pages) resolves the issue.

Additional information: On both, Vercel and Gatsby Cloud, our site deploys without issues in significant shorter build time.

Thanks for your help.

Hey there, @don-esteban :wave:

thanks for your patience here. I did some digging, and @hrishikesh’s advice from the post you linked above still stands.

  1. Try disabling WEBP and AVIF image formats in Gatsby config.
  2. Try reducing the resolution of the source images being processed.
  3. Try using Gatsby < 4.8.
  4. Finally, if those steps still causing issues, you might have to build locally and deploy via CLI.

I know that this isn’t what you were looking for. Please do let me know if you have additional questions.

Hi @hillary, thanks for your answer. I did this all (and more) without success. Taking into account the outages during the last months, we decided to move away. Hopefully other platforms are more reliable. Time will show. During the last 10 years with a self-hosted WordPress site, we never saw not even one single outage. Anyhow, thanks a lot to the nice community and the helpful support members of Netlify including you.

I have good news! It turns out it was not a memory issue after all, but was a bug in Gatsby. It doesn’t appear when building locally because most people are using multi-core machines and the bug only appears when using a single worker. We worked with the Gatsby team to release a fix which went out today. If you update your site to gatsby@4.13.1 then it should fix the problem.

1 Like