Limit Exceeded error

rinkusharmaseve
Visitor
1 0 0

Hi 
Hope you are doing well

I am using the Shopify Rest API for getting the products data and updating the products in shopify store but I am getting "{"errors":"Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service."}" this error again and agoin I have added the delay "sleep(2)"  for resolving this issue but there is no positive response so can you please help me out about this issue.

Thanks & Regards
Rinku Sharma

Replies 2 (2)

Jason
Shopify Expert
11196 226 2287

Are you checking to see how many calls you have remaining or just running into the limit and then deciding to make less calls? If you've been aggressively hitting the api it's possible you've been throttled. The right approach would be to avoid hitting the limit in the first place.

Walk me through how you are handling your calls rates and your bucket size at the moment.


★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

theapemachine
Shopify Partner
16 1 3

The admin rest api has a limit of 2 requests per second and it is best not to push against that. There are headers returned on the request that will tell you how long to wait, so if you implement a request retry with gradual back-off, you can just use the retry-after header to set your back-off value or something like that: https://shopify.dev/api/usage/rate-limits