hygraph / gatsby-source-graphcms

The official Gatsby source plugin for GraphCMS projects

Home Page:https://graphcms.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Too Many Requests

johnwp opened this issue · comments

commented

Are there any known workarounds for this build-time error?

[gatsby-source-graphcms]: Problem building GraphCMS nodes
Error: Too Many Requests

The error appears intermittently (~50%) and usually resolves after running the build again.

Running versions:
gatsby: ^4.24.4
gatsby-source-graphcms: ^2.8.0

Just experienced the same error after doing some changes on the hygraph panel & running the gatsby develop.

this is causing intermittent build failures on our CD pipeline. our current workaround is to just keep running a build until it passes, which isn't effective / efficient.

commented

@itscarlosrufo is this expected?

commented

I'm using an auth token to connect, so I'm surprised it's throttling me when I'm only connecting at build time.

https://hygraph.com/docs/api-reference/basics/errors#429-too-many-requests

looks like hygraph is having rate limiting issues.

The issue is making the free tier almost unusable now. I have to restart the build 5 times now just to see 1 small change in the content.

commented

Is this maybe a product issue? @gijshendrix

Hey folks!

The rate limit is working as expected - the current rate limits can be found in the FAQ section below the pricing table here: https://hygraph.com/pricing

The older free plans (with 5 seats, for example) still have a rate limit of 10 req/s. We would recommend looking into ways of throttling requests so you can stay within those limits.

commented

Hey @belazer, thanks for the reply.

Is there a way to ensure this plugin doesn't exceed 10 req/s? It's causing builds to fail right and left.

Or perhaps slightly increase the limit for authenticated requests?

Unfortunately, I'm not the right person to comment on the code side - but I remember there was a way to throttle requests within Gatsby. I will need to check with the team if anyone is aware of a way to do it.

Did you already try the queryConcurrency option mentioned here? https://github.com/hygraph/gatsby-source-graphcms#options