Response code 429 (Too Many Requests) but http_x_shopify_shop_api_call_limit: '1/40' create Product

randz_alegre
New Member
3 0 0

Im a little bit confuse with this error:
What is the possible issue?
Library used in node: 

MONEI/Shopify-api-node

Response code 429 (Too Many Requests) but http_x_shopify_shop_api_call_limit: '1/40'

 

I am using our Live Store.

> http_x_shopify_shop_api_call_limit: '1/40',
> 'x-shopify-shop-api-call-limit': '1/40',
> 'x-shopify-api-version': '2020-10',
> 'strict-transport-security': 'max-age=7889238',
> 'x-shopify-stage': 'production',
> 'content-security-policy':

But it has no Retry-after attribute.

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 237

Please refer to this regarding API rate limits --> https://shopify.dev/concepts/about-apis/rate-limits. In my own code I build in a "sleep" pause between API calls. Rather than dynamically parse the response headers for each call I just hard-code in the maximum pessimistic amount. If you are scaling up to larger operations I suppose dynamically reading the headers each response and adjusting accordingly might make more sense.

0 Likes
randz_alegre
New Member
3 0 0

yeah there is a rate limit for this but when I check my response header:

'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
'x-sorting-hat-podid': '78',
'x-sorting-hat-shopid': '7415332922',
'referrer-policy': 'origin-when-cross-origin',
'x-frame-options': 'DENY',
'x-shopid': '7415332922',
'x-shardid': '78',
'x-stats-userid': '',
'x-stats-apiclientid': '2456297',
'x-stats-apipermissionid': '84493041722',
'x-shopify-api-terms':
'By accessing or using the Shopify API you agree to the Shopify API License and Terms of Use at https://www.shopify.com/legal/api-terms',
http_x_shopify_shop_api_call_limit: '1/40',
'x-shopify-shop-api-call-limit': '1/40',
'x-shopify-api-version': '2020-10',
'strict-transport-security': 'max-age=7889238',
'x-shopify-stage': 'production'


so it means I am not exceeding to my limit. I am not sure if what is the cause of the error.

0 Likes
randz_alegre
New Member
3 0 0

Here is my headers:
yeah there is a rate limit for this but when I check my response header:

'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
'x-sorting-hat-podid': '78',
'x-sorting-hat-shopid': '7415332922',
'referrer-policy': 'origin-when-cross-origin',
'x-frame-options': 'DENY',
'x-shopid': '7415332922',
'x-shardid': '78',
'x-stats-userid': '',
'x-stats-apiclientid': '2456297',
'x-stats-apipermissionid': '84493041722',
'x-shopify-api-terms':
'By accessing or using the Shopify API you agree to the Shopify API License and Terms of Use at https://www.shopify.com/legal/api-terms',
http_x_shopify_shop_api_call_limit: '1/40',
'x-shopify-shop-api-call-limit': '1/40',
'x-shopify-api-version': '2020-10',
'strict-transport-security': 'max-age=7889238',
'x-shopify-stage': 'production'


so it means I am not exceeding to my limit. I am not sure if what is the cause of the error.

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 237

That's part of my reasoning as to why I hard-code in the most pessimistic API call rates into my apps. One because I'm too lazy to parse the headers and dynamically adjust things, and two I would sometimes run into 429 errors when the headers didn't previously indicate I was running close...lol.