Solved

Hitting REST API Limits (429) when doing very few "orders" PUT requests on dev store

DanAtBonify
Shopify Partner
54 4 32

I am currently using the REST API version 2020-01 on a dev (affiliate) store.

I can perform REST API requests very slowly, such as 1 request every 5 to 10 seconds, and will get the following error:

HTTP Status: 429 (Too Many Requests)

X-Shopify-Shop-Api-Call-Limit: 1/40
Retry-After:

Exceeded 0 calls per second for api client. Reduce request rates to resume uninterrupted service.

 

List of issues:

  1. My call limit usage is "1/40" for the leaky bucket, so why am I hitting an API limit?
  2. The "Retry-After" header is empty.
  3. The message "Exceeded 0 calls per second" doesn't seem to make any sense.

Order-Specific Behavior:

  • The issue is currently only happening when making "orders" PUT requests.
  • The issue does not happen with "products" PUT requests.
  • The issue does not happen with "customers" PUT requests.

 

Is this an issue with the Shopify API or is there a limit on dev stores (affiliate) that I am not aware of?

Accepted Solution (1)
SBD_
Shopify Staff
1829 269 405

This is an accepted solution.

Hey @DanAtBonify 

Thanks for the IDs. It looks like Development stores are limited to 5 order mutations per minute. This used to be in our docs but I can't find reference to it - chasing this up.

The response message is confusing too, I'll raise this internally.

Thanks for flagging!

Scott | Developer Advocate @ Shopify 

View solution in original post

Replies 8 (8)

Not applicable

Hi @DanAtBonify ,

 

What's your development stack? Even if the Retry-After is empty the header is still there, why can't you try/catch that and resume where you left off?

 

Regards,

 

Sam Bazargan - Owner

DanAtBonify
Shopify Partner
54 4 32

Hi @Anonymous,

The primary issue, unfortunately, is that the 429 error is happening way too soon... I'm expecting my bucket to accept up to 40 requests, and trickle out, however I can perform just a few requests very slowly and run into this issue, so I'm not sure what's causing it. When I do hit the issue, and wait 10 seconds and try again, I can hit the same issue again (shouldn't be possible given the leaky bucket).

And it's only happening on "orders" for me, which makes the problem even stranger.

Regards,
Dan

Not applicable

@DanAtBonify ,

 

Then you're sending out requests in bursts. I can't see your code so this is speculation, but there's no limit in a Dev shop for REST API so you're having an internal issue with your app. I would look for web server logs since sometimes we think our code is doing something but it's actually not. 


Regards,

Sam Bazargan - Owner 

SBD_
Shopify Staff
1829 269 405

Weird. Thanks for reporting @DanAtBonify. DMing for details.

Scott | Developer Advocate @ Shopify 

DanAtBonify
Shopify Partner
54 4 32

@SBD_ Were you able to see anything in the request ID I sent over?

SBD_
Shopify Staff
1829 269 405

This is an accepted solution.

Hey @DanAtBonify 

Thanks for the IDs. It looks like Development stores are limited to 5 order mutations per minute. This used to be in our docs but I can't find reference to it - chasing this up.

The response message is confusing too, I'll raise this internally.

Thanks for flagging!

Scott | Developer Advocate @ Shopify 

belazaras
Shopify Partner
3 0 3

Any news here? I'm having the same issue even after hours of receiving the last 429 error, when trying to duplicate a product and I just get another 429. It's not even a dev store. Please help, thanks.

Gregarican
Shopify Partner
1033 86 285

Best advice would be to list one of the request ID's coming back in the 429 response headers. That way a Shopify staffer can look into it to provide some feedback.