Jay
Jay

Reputation: 535

BigCommerce API Rate Throttling

We have been using the BigCommerce API for about 2 years. It has worked great for us. All of a sudden, we are getting 509 responses. This indicates rate throttling. The documentation suggests that the current limit is 20,000 requests per rolling hour. We should not be within 2 orders of magnitude of that.

It was suggested that I regenerate the API key. I did that, but we are still getting the 509. I can see in headers that come back from good requests that we might have 9,000 or 3,000 requests remaining. Those numbers look too small to me, but it does seem to be counting down.

We are using two different API keys for 2 different apps. How does the rate limit apply? Is it for the whole account or per key?

And the big question, how can we find if something is really hitting frequently enough to exceed quota, and if so what it is?

Thanks for your help.

Upvotes: 1

Views: 1092

Answers (1)

user2066189
user2066189

Reputation:

I'm assuming that you are connecting to the API via via Basic Auth and that the rate limits mentioned here are applicable. (Using the new OAuth method has different rates)

One thing to be aware of is that the rate qouta is for the store and not your app/token. In theory if a store has installed 10 applications and one of those apps makes 15,000 calls within the hour, there would only be 5000 calls left for the remaing 9 apps.

You can see the affect yourself if you have two tokens. Connect both to the same store and make a few calls with one token. If you then make a call with the second token you should notice that the X-BC-ApiLimit-Remaining header has been reduced by the same number of calls made by the first token.

Upvotes: 2

Related Questions