-
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
Gatsby build occasionally time out after "Caching JavaScript and CSS webpack compilation" #33557
Comments
updates the husky config after v7 (ensures the commit hook works) |
I am also having this issue. I feel (although not sure) that these are caused by sharp plugin. gatsby-transformer-sharp & gatsby-plugin-sharp maybe. edit: |
Hi, thanks for the issue! Did you try out the |
Pinning these dependencies to
I haven't tried As for whether we can definitely pinpoint this to sharp, I'll hand this to @robmarshall—I'm not sure how you figured this out (💯). But if it is indeed related to the gatsby monorepo version bumps, in my project I saw the failures start to happen on the day this PR was merged, i.e. the bump from 3.13 to 3.14. |
I can confirm the issue is introduced by gatsby-plugin-sharp 3.14. Bumping it to next does not solve the problem. |
I hit the same issue. With With |
I had the same issue, rolling back to version 3.13.0 for gatsby-plugin-sharp and gatsby-transformer-sharp fixed it for me. Although i did get caught out by the ^ symbol in my package.json, so I went from "^3.13.0" to "3.13.0" |
Upgrading to Gatsby v4 with related packages now causes my build to stop at "success run queries in workers - 7.453s - 65/65 8.72/s" |
I'm getting the same issues as @sirichards. And previous to the Gatsby 4 upgrade I was getting the freeze at "Caching JavaScript and CSS webpack compilation". To get the project to build again I had to revert back to Gatsby 3 packages and makes sure to use: gatsby-plugin-sharp:3.14.1 |
Can confirm, facing the same issue. |
Same here, on both local system (see below) and Netlify:
|
Thanks to @robinmetral for help getting his starter to run I did manage to reproduce few times (on GitHub Actions, still not locally :( ). Current working theory is that using single ReadStream for multiple pipeline is the root of the problem (not always, depending on timing conditions) and will be checking if utilising https://github.com/mcollina/cloneable-readable to create stream clones help --edit |
Thanks for the fix! Is this live on v4.0.0 or would it come with the next release? @wardpeet |
It can't be in 4.0.0 since it's already on npm, but judging by the labels on the PR the fix will be released as a patch for both v3 and v4 |
correct |
My gatsby-plugin-sharp version is 3.9.0 Might this be a separate issue? FWIW - this is far more than "occasionally" as stated in the issue title. It's occurring almost every time I run gatsby build. This is killing development of things that only occur in production mode of gatsby build (e.g. robots.txt creation). For now I've been able to test only by pushing to Netlify where it seems to still be working. "dependencies": { |
I've noticed this issue happen clearly on machines with < 6 cores of CPU. |
@icy-meteor Ugh. Yep. I converted an older machine to Ubuntu. It only has 4 cores. |
I just dragged out an old laptop with 8 cores, pulled the recent changes. The build ran fine. This machine has 8 cores. |
I've published a fix in gatsby-plugin-sharp version 4.0.1. Version 3 will soon follow |
Thanks for the patch!
|
And another issue which may be related. Using gatsby 3.14.3 with sharp+transformer 3.11. I get a 20 minute delay between two steps
|
Can confirm, the issue seems to be fixed now on Gatsby v4. Thanks 🚀 |
Patch for v3 was just released ( |
Confirming this seems to be fixed on Gatsby 3. Thank you. |
Hello, I am still experience the same issue of @sirichards with |
+1, I am having the same issue as @lezan and @sirichards. Upgraded to Gatsby v4, and the first few builds had no issues. However, today all of my builds are hanging at Log snipped below from the first time it happened, and has persisted all day:
Tried a few various things to get things unstuck, turning on parallel workers, DSG in some pages, but doesn't seem to be having any effect. The next step in the process, 'merge worker state', never seems to happen/finish. |
Maybe I digged my issue to |
Interesting! I just dig into my config files and I am set to I am, however, using Something must be going on that has degraded the performance of sharp though, because my builds were not taking as long as all this before I started running into this error. I've also managed to burn through so so many build minutes on Netlify trying to debug this as well, as I kept trying to see whether the adjustments I made were cutting back on the build time or not. So will be careful in testing this out, will try the builds locally and see if it takes less time before trying things out on Netlify. Aside: DSG, incidentally, hasn't helped this because I guess Gatsby needs the images available in advance even if the page generation gets deferred, so those operations always happen on build anyway. |
Hey @NickBarreto for my particular case |
Do you think it would be worth submitting a new issue with all these findings? 👀 it looks like a different bug, and it might have more visibility when not at the bottom of a closed issue 😛 |
It is expected (and not a bug) that with Additionally, you'll have a better experience on Gatsby Cloud than on Netlify since we push the image work to cloud functions with more memory. |
Thanks for the info everyone. I think I will create another issue because I do think there has been a regression here. Admittedly my site has quite a few images (~1600), but under v3 and also in my first builds of v4 the time elapsed in the logs between Now the process is hanging between those two steps, with the same number of images processed, and can take upwards of 20 minutes to move on to merging the worker state. So I've gone from full, uncached builds in Gatsby v3 taking ~13 minutes to taking so long in v4 I hit the 30 minute limit on Netlify which causes my builds to fail. |
This was resolved for me when I removed: |
Preliminary Checks
Description
About a month ago, builds of my Gatsby site started failing in GitHub Actions.
For context, this Gatsby site is a minimal example using my
gatsby-source-s3
plugin, that I use for testing the plugin end-to-end.Here's from an example of a failed build:
At first, all builds were failing, and in the last week it seems that some of them are passing again while others are still failing.
I'm not sure what's happening here, as there are no helpful logs in the build output. A local
gatsby develop
works completely fine. The occasional passing build seem to rule out issues in my project or in other dependencies. I also asked on discord but it didn't seem like anyone was having the same issue.Any thoughts on:
Thank you!
A note about the reproduction link 👇 I am aware that the issue template says "Do not link to your actual project", but in my case this example site is exactly a minimal example, since the only thing is does is pulling images from S3. I added the GH Action output there, here's the link to the actual source although I doubt that it will be helpful.
Reproduction Link
https://github.com/robinmetral/gatsby-source-s3/runs/3912139392?check_suite_focus=true
Steps to Reproduce
Expected Result
gatsby build
should not time outActual Result
gatsby build
is flaky and unreliable, and regularly hangs in CI envsEnvironment
My local environment is not the issue here, this is failing on a clean GH Actions machine with:
Config Flags
No response
The text was updated successfully, but these errors were encountered: