Error: connect ETIMEDOUT
See original GitHub issueDescription
I can’t launch / build the project because the plugin constantly throws ETIMEDOUT error (most often for MediaItem).
Steps to reproduce
Just follow this instruction: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/getting-started.md
gatsby-config.js
{
resolve: 'gatsby-source-wordpress',
options: {
url: process.env.WPGRAPHQL_URL,
},
}
Then
yarn start
Expected result
Expect that the project will be launched and the requests will be fulfilled.
- how to increase timeout?
- can I possibly skip these errors?
Actual result
Some time for random query:
And for MediaItem (very often)
Environment
What I tried
- package.json (didn’t help)
"develop": "GATSBY_CONCURRENT_DOWNLOAD=5 gatsby develop",
- config options (didn’t help)
gatsby-config.js
{
// ...
MediaItem: {
localFile: {
requestConcurrency: 5,
},
lazyNodes: false,
},
html: {
useGatsbyImage: true,
fallbackImageMaxWidth: 200,
createStaticFiles: true,
imageMaxWidth: 756,
},
schema: {
timeout: 3000000,
requestConcurrency: 5,
},
// ...
}
Halp!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What could cause "connect ETIMEDOUT" error when the URL ...
The URL above cause some issues because HTTP does not exist at the beginning of URL so Just change it to it should...
Read more >Fixing Etimedout error - Postman
The ETIMEDOUT error means that the request took more time than the webserver configuration allows and the connection has been closed by the...
Read more >How do I resolve the error: connect etimedout
ETIMEDOUT (Operation timed out): A connect or send request failed because the connected party did not properly respond after a period of time....
Read more >HOW can i solve the Error: connect ETIMEDOUT when try to ...
The error always states the Error: connect ETIMEDOUT… the funny thing is that i can connect the cluster with mysql client terminal and...
Read more >Error: connect ETIMEDOUT - Salesforce Stack Exchange
ETIMEDOUT (Operation timed out): A connect or send request failed because the connected party did not properly respond after a period of time....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Timeouts for creating a new node aren’t directly applied to fetching a remote node. Instead of using
gatsby-source-filesystem
thegatsby-source-wordpress
plugin decided to reimplement it.https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-remote-file-node/index.js#L58
These timeouts need to be adjustable because there is no one-size-fits-all solution here. These calls ALWAYS fail after a threshold. This is the second time an issue like this has burned me, the first time was from the
gatsby-source-filesystem
which I submitted the fix for. Now it’s this reimplemented solution that needs it.node_modules/gatsby-source-wordpress/dist/steps/source-nodes/create-nodes/create-remote-file-node/index.js
Look for
got.stream
in the file and the timeout associated. Change it to look likeThis will have the timeout execute when the socket is connected instead of when it’s queued. The documentation notes how the times are treated: https://github.com/sindresorhus/got/tree/v11.7.0#timeout
You may want to adjust
CONNECTION_TIMEOUT
orSTALL_TIMEOUT
as well.You will want to use something like patch-patch to make the change until this is properly fixed