Skip to content
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

feat(gatsby-source-strapi): timeout setting for queries #447

Open
george-wb opened this issue Jul 28, 2023 · 2 comments
Open

feat(gatsby-source-strapi): timeout setting for queries #447

george-wb opened this issue Jul 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@george-wb
Copy link

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

Screen Shot 2023-07-28 at 11 13 33 AM

@george-wb george-wb added the enhancement New feature or request label Jul 28, 2023
@george-wb george-wb changed the title feat(<gatsby-source-strapi>): <timeout setting for queries> feat(gatsby-source-strapi): timeout setting for queries Jul 28, 2023
@george-wb george-wb changed the title feat(gatsby-source-strapi): timeout setting for queries feat (gatsby-source-strapi): timeout setting for queries Jul 28, 2023
@george-wb george-wb changed the title feat (gatsby-source-strapi): timeout setting for queries feat(gatsby-source-strapi): timeout setting for queries Jul 28, 2023
@moonmeister
Copy link
Contributor

Sounds like a great feature. A PR would be welcome.

@yasirhaleem
Copy link

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` 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants