question

jonathan avatar image
jonathan asked jonathan commented

HTTP Exception 429 in Production

I have had a customer signup to a recently launched app. The first thing the app does is retrieve most information about the merchant: merchant, address, order types, hours, and inventory. I see that the merchant encountered an http exception 429, which looks like too many requests.

It does not look like this merchant has a large volume of information.

Any ideas what would cause this?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jonathan avatar image
jonathan answered

I added a rate limiting algo that limits the request to 8 per second per token. That seemed to address the issue. Hat tip Jack Leitch at http://www.jackleitch.net/ for his rate gate tool.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mike M avatar image
Mike M answered jonathan commented

Please also refer to the following documentation on rate limiting:

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jonathan avatar image jonathan commented ·

I was unaware of the 50 requests per app. Thank you for that info. We will add a rate limiter for that as well, although I think it is unlikely we would ever hit that.

Also, we found an actual cause; we were getting a lot of items individually. Our method had us getting all items (which was limited to 100), then retrieving individually for category items that we did not have. We have changed that to retrieve items when we retrieve categories. So that will dramatically reduce the number of calls.

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Excellent, that is great to hear!

0 Likes 0 ·

Welcome to the
Clover Developer Community