-
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
fix(gatsby-source-filesystem): Removes erroneously added retries option #24899
fix(gatsby-source-filesystem): Removes erroneously added retries option #24899
Conversation
… start after connection has been made
You are linking to docs for most recent There is always option to upgrade |
@pieh Though undocumented, looking into the relevant code the retries option is overwritten to It also doesn't look like the retries param is targeted the correct property. Should be I would recommend upgrading this lib to a more current version though. Their code has substantially improved over the last few versions. |
I'm fine with upgrading, we just can't upgrade to latest version because that requires |
Thanks for this, it worked much better for me where my builds were failing from the timeout error. Using the change, I received two errors where failure to retrieve the images still occurred:
Both of these urls are valid, but exhibited different behaviour in Chrome when visited. The first loaded the image directly, while the 2nd triggered a download without any rendering in the browser. I did My internet connection can manage 10Mbps(little over 1MB/sec), and has no problem retrieving these images manually, is gatsby trying to retrieve them in parallel, failing, then retrying with the same concurrency triggering the problem again? Unfortunately, this seems to require doing a |
I was able to successfully download all files via If possible, it might be useful for retry behaviour to reduce the amount of concurrent requests permitted, perhaps by half? I personally did not notice a slower download time, it may have been faster for me with fewer connections(presumably because I could easily saturate the link bandwidth, but was somehow more stable with fewer requests? My connection is over wifi G or N) |
@polarathene The I do agree that making those vars overridable is worth doing, however, extending the timeouts only moves the goalpost instead of fixing the core issue. @pieh Is it possible to push this fix through until an upgrade of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in.
Thanks for your patience.
Holy buckets, @ThyNameIsMud — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
…on (gatsbyjs#24899) Co-authored-by: Louis Weber <lweber@riversagency.com>
…on (gatsbyjs#24899) Co-authored-by: Louis Weber <lweber@riversagency.com>
Specifies remote timeout to start after the connection has been made
Description
gatsby-source-filesystem's remote file node will occasionally throw a got.TimeoutError if the TCP socket was queued. The solution was to target the specific
send
timeout which starts when the socket is connected and ends with the request has been written to the socket. This keeps with what I assume is the intended purpose of the timeout while hopefully throwing the error simply because the TCP connection was queued.This also removes the retries option from the got request since the docs note streams ignore this option due to the errors that would cause a retry would need to be handled correctly to avoid duplicates (which they are). Note: The got.TimeoutError is a separate timeout and wouldn't be triggered here.
Documentation
https://github.com/sindresorhus/got#gottimeouterro
https://github.com/sindresorhus/got#retry
Related Issues
Fixes #22010
Fixes the got part of #23123