Rate limit exceeded
I'm trying to upload programatically a great amount of files. Most of them are uploaded correctly, but some of them fail returning a 429 code error (rate limit exceeded).
I've been looking for more information about this rate limit on your documentation pages, but I haven't been able to find the values of this limit (file size, uploads per second/minute, time between uploads,... ?).
I've also seen in the documentation that this error should return a "time-to-retry" value, nevertheless I'm not able to find this value within the returned error.
What uploading strategy do you suggest to avoid this issue?
-
Hi ,
In certain cases, Box needs to enforce rate-limiting in order to prevent abuse by third-party services and/or users. In the event that an excessive level of usage is reached, a standard
429 Too Many Requests
error will be returned, with an indication of when to retry the request. In the event that back-to-back 429s are received, an exponential backoff algorithm is recommended.The limits are set on a per user basis and is based of number of uploads /s (this exact number may vary over time)
Here are some common solutions to Rate Limiting:
- Backing off when rate limits are hit using an exponential back off method
- Caching information when possible to reduce necessary calls
- Imposing throttling on calls made from the application to Box
- Gathering estimates for the calls that are hitting the rate limits (what calls, how many, burst versus consistent) so that we can work with you to explore alternative solutions.
Depending on the business urgency and amount of data which needs to be transferred to Box you could consider "Box Shuttle" our new managed content migration service provided by Box Consulting.Our User Services Team would be happy to clarify specific questions around the API Rate Limits and why you are not seeing a "time-to-retry" value. To get started, please submit a case here and select "API/Developer question..." to ensure your inquiry is routed appropriately.
Peter
-
While the answer is detialed, the answer is not sufficient to explain why this is happening for my specific circumstances. I need to know what criteria is applied to my account. I uploaded three files this AM, using the node.js sdk for box. I have no retry setup explicitly in my config. I have noted the retryIntervalMS is default to 2000ms (https://github.com/box/box-node-sdk/blob/master/lib/util/config.js#L40) . It looks like it will retry 5 times max before reporting an error. Why should this get me a 429 error uploading only two files, with the box.net sdk defaults? Are these defaults not suitable?
サインインしてコメントを残してください。
コメント
3件のコメント