A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We've been using shopify admin API (REST) for over a year, but as of this month, we started getting
"Too Many Request" at random.
It looks different because the headers do not include the information documented here:
https://shopify.dev/docs/api/usage/rate-limits
We think this is a bug because:
1. When we get throttled, prior to the event the X-Shopify-Shop-Api-Call-Limit header does not show anything close to the limit.
2. There is no Retry-After header as proposed in the documentation.
3. We have a fibonacci backoff-retry that waits for 1 second, then 2 seconds, then 3 etc. 5 retries total and even after 20 seconds it still fails.
The headers are telling us this might be coming from CloudFlare.
Example:
data: {
errors: [
0: {
extensions: {1}
message: "You have sent too many requests. Try again soon."
}]}
headers: {
alt-svc: "h3=":443"; ma=86400, h3-29=":443"; ma=86400"
cf-cache-status: "DYNAMIC"
cf-ray: "7c910f646b348133-ORD"
connection: "close"
content-type: "application/json"
date: "Thu, 18 May 2023 03:37:11 GMT"
nel: "{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}"
report-to: "{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=[REDACTED]"}],"group":"cf-nel","max_age":604800}"
server: "cloudflare"
server-timing: "cfRequestDuration;dur=29.000044"
transfer-encoding: "chunked"
x-content-type-options: "nosniff"
x-dc: "gcp-us-central1"
x-download-options: "noopen"
x-permitted-cross-domain-policies: "none"
x-request-id: "..."
x-sorting-hat-podid: "231"
x-sorting-hat-shopid: "..."
x-xss-protection: "1; mode=block"
}
Has anybody experienced elevated error rates recently or other strange behavior?
Is there any support that we can get or are we on our own?
In terms of contacting Shopify support, we get directed to this forum, and they tell us that Shopify developers read this messages.
Last night we had 4 throttling incidents, a 400% increase even though our spring and summer traffic decreases.
Hi @IvSegal,
Thanks for your post. It's recommended that you re-submit your report to Partner Support directly through the Partner dashboard using the 'API Support' topic which has an 'Email us' option to help get the report to the right team.
Please include specific details such as which app was connecting to which store's endpoint and at what date/time/timezone with examples being as recent as possible.
Thanks and hope you have a great day,
Jon551
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog