Outlook Mail API: Error 429 after 500 message 'move' requests

Copper Contributor

We often receive an error 429 when using the Microsoft Graph or Outlook Mail REST API for particular actions on one mailbox. Error 429 seems to be a Throtting issue, but we cannot find any information about the issue we experience, because it's not related to the 'Rate-Limit' throttling rule documented here: https://blogs.msdn.microsoft.com/exchangedev/2017/04/07/throttling-coming-to-outlook-api-and-microso....

 

We are now able to reproduce this with the following step below: (we used direct Outlook Mail API to reproduce it)

  • Get number of items in the Inbox
  • Get subfolders of the Inbox
  • Read first 10 e-mails sorted by ‘received date’
  • For each email, move the e-mail to the ‘processedbox’ (which is a subfolder of the Inbox).

 

At exactly  500 ‘move’ actions we see the following behavior of the API:

  • After 500 move actions:
    • Error 500:
      • code=ErrorMoveCopyFailed
      • message=The move or copy operation failed.
  • The next ‘move’-action
    • Error 429
      • code=ErrorTooManyObjectsOpened
      • message=Too many concurrent connections opened., The process failed to get the correct properties.
  • Important to mention here is that the other 3 request (Get number of items, get subfolders and read first 10 e-mails) are still working after this and return the correct data. Only on the move action we receive an error 429.

 

We tried several mailboxes (shared and user mailboxes), same issue.

 

It’s not the ‘Rate Limit’-throttling, because the header returns the information below and there are still remaining requests, when the error 500 occurs:

Rate-Limit-Limit: 10000

Rate-Limit-Remaining: 9502

Rate-Limit-Reset: 2018-01-12T15:30:26.817Z

 

We currently cannot find any Throttling documentation related to the 500 move actions.

 

We sometimes have to wait for more than 30 minutes before the 429 error disappears.

 

Is this a bug in the API? Or a throttling rule/issue?

Anyone experiencing the same?

 

 

2 Replies

Yes, 429 is the HTTP error code "Too Many Requests - The user has sent too many requests in a given amount of time ("rate limiting")."  The HTTP specification doesn't specify how the server identifies the user, nor how it counts requests, so the implementation might hit a limit earlier than you would otherwise expect. 

 

We don't have access to the details of the implementation, and it might change from time to time, so depending on how it is implemented you might also get a 500 thrown from time to time as well. I am not surprised that you are getting rate throttling even though the headers claim you have a few requests to spare, but I agree that the very precise Rate-Limit-Remaining header is unhelpful if it is not accurate, and worth raising as an issue.

 

 

Hi, we are actually facing the same problem. Do you have any news regarding this? Thank you in advance.