You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

tipako's avatar
tipako
Explorer | Level 4
7 months ago

ServiceUnavailable 503 when doing a lot of requests - expected rate limit error

When there are a lot of requests to the API, at some point a 503 - ServiceUnavailable error code is returned. The documentation does not cover this case (https://developers.dropbox.com/error-handling-guide mentions 500, but not 503).

 

In the .NET SDK there's this note:

https://github.com/dropbox/dropbox-sdk-dotnet/blob/a7d7f817e38b799ef13e35b7d1bf6b68b170f992/dropbox-sdk-dotnet/Dropbox.Api/DropboxRequestHandler.cs#L396

 

// dropbox maps 503 - ServiceUnavailable to be a rate limiting error.
// do not count a rate limiting error as an attempt

 

The comment was added a long time ago - is it still valid and correct? Am I good to just wait a few seconds (maybe with some exponential backoff) and retry the request?

Why is a 503 error returned instead of a JSON indicating a rate limit problem (e.g. with error "too_many_requests")?

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Dropbox does currently use 429 for explicit rate limiting, but there are a number of different error cases, some of which may return a 500 or 503. (The way these were handled has changed somewhat over the years and across API versions.)

     

    In any case that you get a 5xx (such as 500 or 503), retrying the request after a short delay, with an exponential backoff as you mentioned, is a good way to handle these.

    • tipako's avatar
      tipako
      Explorer | Level 4

      Thanks for the confirmation. I think it would be great if this information could be added to the API's "error handling guide", which already covers other HTTP result codes, but not this one. Judging by the amount of posts here in the forums, the 503 code is confusing many developers

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,887 PostsLatest Activity: 37 minutes ago
326 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!