-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: UNHANDLED REJECTION write EPIPE #28011
Comments
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
@jack0wsky try updating to a more recent version of gatsby (as of writing this we are at 2.28.0). |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Worked for me! |
We are still seeing this issue with the latest gatsby ERROR UNHANDLED REJECTION write EPIPE Error: write EPIPE
npmPackages: |
Yes, this error also happens for me every time I shut down using ctrl-C on macOS. Demo repo: https://github.com/upleveled/gatsby-serverside-auth0/tree/main/packages/gatsby-website |
Same thing happens on Win10:
Node: v14.15.4 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
hey @jack0wsky , @karlhorky , @sol-idsnake and @aravind-tc there is nothing wrong with GatsbyJS its how NodeJS handle piping data into closed streams, the error might be caused when the NodeJS event loop didn't clean-up closed TCP connections from the HTTP connection pool and then the NodeJS runtime attempted to use the closed TCP connection. |
Hmm... but I think there's a way to hook into the |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
hello stalebot |
Has anyone figured out any solutions for this error? IM getting the same EPIPE error every time I shut down my local server. |
I almost always get that same error. I'm using |
I get this error, too. Happens every time I use control+c to shut down gatsby develop mode. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
So I'm running two Gatsby websites, both with latest package upgrades and both running on Netlify. One of the websites uses the new gatsby-plugin-image while the other one uses a mixture of the new and the old (gatsby-image) plugins. Several of the pages have a large amount of images utilising the gatsby-image which seem to overload the memory capacity of Netlify. The website where I'm only using gatsby-plugin-image doesn't have this problem at all, while the other website experiences this error about 25% of the builds. |
I did want to share that I reduce the amount and size of images that we were processing (from Wordpress). In particular, I was able to consolidate duplicate images from SEO and other fields. I also make sure we didn't have any large images in terms of resolution width and bytes. After that our build time was drastically reduced by half and the Gatsby 4 builds in Netlify no longer time out. |
@MuhammadHadiofficial Migrate away from gatsby-image |
@kb1995 Hi, I didn't get it what are other options? |
That's not really a solution, since Gatsby image is a core part of what makes Gatsby nice. |
I ended up resizing and resaving my images and it builds successfully now. What seems weird to me is that I have another site with a lot more images that never had this issue. For reference the site that failed had a total of 25 images. |
@Skil3e can you tell me the actual difference between the size of your image before and after resizing was the size difference much larger? |
That's not really a solution, since Gatsby image is a core part of what makes Gatsby nice. |
@MuhammadHadiofficial not really big size difference more on reduce of file size, somewhere between 100kb to 500kb smaller filesies, As i said before though it seems weird as there were not too many or too big images to begin with. |
You can migrate from gatsby-image (a deprecated API) to gatsby-plugin-image (new API). You can still continue using Gatsby for what makes it nice |
I'm using gatsby-plugin-image already on previous plugin we didn't had this issue after migrating to gatsbyv4 and new image plugin we started to face these memory related issues. |
Oh, I see what you mean. That said, I believe the same memory issues happen with new API (gatsby-plugin-image). I'd not seen the issue after reducing image size, but a few new Wordpress images triggered this issue just the other day. We removed all instances of |
@stevepepple if you removed the gatsbyimagedats? |
It's a little confusing. I removed |
Hi @stevepepple and @MuhammadHadiofficial you should reference the migration doc: https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/ GatsbyImage originally came pre-baked into Gatsby v1-2, but was later deprecated in favor of the plugin approach, which has a simpler API and some additional functionality (including somewhat better performance for page visitors). Unfortunately I do not believe that it is a solution to this particular problem. |
Hi @panzacoder , I've already migrated to latest Gatsby version4 and latest Gatsby image plugin and ran the migration script also. |
Thanks for clarifying the state of your project. I have also had the same issues with Netlify, and in general Gatsby v4 (I actually ran into memory issues running on Gatsby Cloud as well. I'm assuming there are deficiencies in our build step that need to be addressed, but I don't have time to figure that our right now, so I migrated down to Gatsby v3. I believe there was only one plugin I had to update to get stable builds again, but YMMV. I am hoping to have time to dig into our performance build issues sooner-than-later but right now our marketing team requires focus elsewhere. What's frustrating for me overall is that this seems to be a pretty big issue (memory usage in build step) but there's not a clear path forward on figuring out what is causing it, whether it's a framework issue, a plugin issue, or a custom code issue. TL;DR: Revert to Gatsby v3 until you have time/budget to diagnose your build performance |
Thanks @panzacoder. Why is this issue closed though? I don't believe downgrading is an adequate work around for many who need to use the latest version of Gatsby. |
This issue should not be closed. Image processing works on my local environment but not Netlfiy. Something that started happening after updating Gatsby. |
Btw, there appears to be another issue for the same problem along with my latest update/workaround for Netlify. Curious if it helps your instance @byebyers |
I was facing this issue while deploying with netlify with gatsby version 4.11.0, |
This issue recently started happening to me across three client projects. One of which was already upgraded to Gatsby v4 before it started and can't be rolled back to v3. The other one is waiting for a fix so that the upgrade can be completed. But the most clear demonstration of this issue is the most recent project, which I started about a week ago (so of course it uses v4). It only has about 14 images that are a few hundred KBs each (but reused in a few places at different sizes), across 20 pages. Builds are failing left and right and only sporadically work. It's extremely unreliable. I don't think it's an issue of inefficient coding, I am writing fairly idiomatic code as recommended in the docs. There is a major issue going on with Gatsby v4 and Netlify. When will it be taken seriously?
|
The thing that worked for me was pinning my Gatsby version to 4.7.2. I changed it in my package.json then ran npm install. The issue seems to be with the latest version. |
In the case of the issue with v4.8+ and Netlify, #35055 is currently ongoing. |
@panzacoder any updates on the issue? |
I am on Gatsby v^4.11.2. The issue only came up for me after I changed an image in my repository. I am seeing this issue now on my Netlify build as well and it seems to be connected to gatsby-plugin-image. Image file size seems to not affect the issue. I reduced the image file size to 2 MB from 24 MB but the issue is still occurring. |
Same isssue when I deploy on Netlify with
|
Not sure if this will help but I found that this error had a lot to do with my client's use of Headless WordPress (I joined after it was set up). For example: Changing an image on a page or post may not actually remove the original and replace it with the newer version. Instead, WordPress attaches the new image with the old one and thinks the post now has a gallery. It will still serve the correct image to the live page and not an array. However, Gatsby will still at build time run its image optimization on all attached images, regardless if they are being used. To remedy this I recommend going through your media library and detach any extra images you may have. Another is if WordPress has to deal with large asset sizes like gifs or video files. When these are passed to Gatsby at build time, the WordPress server gets overloaded and the error is thrown. At least it was for me anyway. I basically had to talk to the team to be aware of what kind of assets they are using because WordPress as a CMS may not be able to handle sending these to Gatsby. We had to replace them with more optimized versions. Its super lame and if you have a chance I recommend steering clear of Headless WordPress. It's issues run deep in terms of how it integrates on the Jamstack. |
Hey. This is a duplicate of #35055 , which now has a fix. If you update to |
Description
Hello everyone!
I'm getting this error almost every time I shut down local server.
I've tried multiple times
but it solves problem only for some time. Don't know if it is related but when
gatsby develop
and dev server is running, after some saves, when I click Command + S to save changes, hot reload doesn't work and project isn't re-rendering.Steps to reproduce
Expected result
Shuting down dev server without errors
Actual result
Throwing error mentioned above and hot reload not working.
Environment
The text was updated successfully, but these errors were encountered: