3

When fetching images it returns

Fetching image_url is taking a long time time (longer than 15 seconds). This file is File_size MB``` After few of this line it crashes with ```error RequestError: Timeout awaiting 'request' for 30000ms. 

How can I increase this 15sec timeout limit?

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
Dipankar Maikap
  • 447
  • 4
  • 13

2 Answers2

0

I would suggest using the built-in options:

{
  resolve: `gatsby-source-wordpress-experimental`,
  options: {
    schema: {
      requestConcurrency: 50,
    },
  },
},

Alternatively you can change your develop running command to, in your package.json:

"develop": "GATSBY_CONCURRENT_DOWNLOAD=5 gatsby develop",
Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
  • I've already done that still same. ```timeout: 120000, requestConcurrency: 50, perPage: 50``` I'm using this in config. – Dipankar Maikap Dec 10 '20 at 06:21
  • Have you tried the second approach (`GATSBY_CONCURRENT_DOWNLOAD=5 gatsby develop`)? In one of my projects was the only workin way – Ferran Buireu Dec 10 '20 at 06:22
  • Just tried ```GATSBY_CONCURRENT_DOWNLOAD=5 gatsby develop``` same outcome. – Dipankar Maikap Dec 10 '20 at 06:32
  • I don't under stand why would it say 15 sec after I changed ```requestConcurrency: 50,``` to this. – Dipankar Maikap Dec 10 '20 at 06:34
  • Can you try upgrading your packages and `npm` version as well? – Ferran Buireu Dec 10 '20 at 06:39
  • Same no luck, If I replace the live wordpress site with my local wordpress site it works fine. – Dipankar Maikap Dec 10 '20 at 06:53
  • im getting the same issue - it says 'Try lowering process.env.GATSBY_CONCURRENT_DOWNLOAD. It's currently set to undefined.' in my .env file i have it set to 1. any orther ideas to fix this? – jkstallard Mar 04 '21 at 10:14
  • It should be triggered in the develop or build command, not in the environment files – Ferran Buireu Mar 04 '21 at 10:18
  • thanks @FerranBuireu - changing the .env file fixed this for another project. its odd as other users aren't getting this issue (they are on MAC, me Windows). in my gatsby-config, my build command shows: 'develop: { hardCacheMediaFiles: true, nodeUpdateInterval: 10000000'. would altering these figures help fix the build issue? – jkstallard Mar 04 '21 at 11:52
0

I was having the same issue, it it was fixed after upgrading from Node v10 to v14 and running npm rebuild