plugins
plugins copied to clipboard
feat(gatsby-source-strapi): timeout setting for queries
Is your feature request related to a problem? Please describe.
Hey guys, the team I'm working with needs a feature that allows us to change the timeout for queries to Strapi. We utilize Strapi as a website builder and have many sites in the CMS. We have a couple of very large sites with over 100 pages, and when the query takes 60 sec or longer we get a 504 timeout error coming from [gatsby-source-strapi]/[axios]/lib/core/createError.js:16:15
Describe the solution you'd like
We'd like to be able to pass in our own timeout parameter for Strapi queries similar to how file fetching has the GATSBY_STALL_TIMEOUT
env variable to alter the timeout settings (we've tried this and it doesn't work for our problem).
Describe alternatives you've considered
We have looked through the code to see where the query timeout is being set to 60 seconds and we're not able to find it.
Additional context
Sounds like a great feature. A PR would be welcome.
try changing the numbers in strapi config/api.js
to get records per page.
maxLimit: 20 means 20 records per page, it should fix the timeout issue hope it helps.
module.exports = {
rest: {
defaultLimit: 20,
maxLimit: 20,
withCount: true,
},
};
couldn't find how we can set or disable this in `gatsby-source-plugin`