0

I have written a program that uses multiple threads to access SharePoint online REST api's to make many 1000's of web service calls. After a while I get 429 errors due to my heavy usage.

I only have one SharePoint online account that I am making all the requests through.

I notice that there is a Retry-After header, and this link about 429 rate limiting handling provides a way to use a retry loop using the retry-after header as a guide.

But does Retry-After really have any meaning when you are accessing the software with multiple threads? Because if you wait the specified number of seconds, wouldn't another thread just reset that anyway?

0

Do not attempt operations that might trigger a 429 in multi thread code. Multiple threads will operate independently and will defeat the purpose of any throttling mitigation techniques you might enact.

Use a single thread and implement the ExecuteQueryWithIncrementalRetry extension in the link you posted.

  • single thread is too slow to achieve any sort of realistic performance expectation. – Nicholas DiPiazza Mar 15 at 17:24
  • change the expectation. SharePoint will only accept so much traffic and we can't change that. – Derek Gusoff Mar 15 at 17:28
  • this should be something microsoft warns customers about before switching on-prem to sharepoint online, that performance of large bulk operations is unacceptable for any real use cases. thanks though, appreciate your input – Nicholas DiPiazza Mar 15 at 18:12
  • throttling is a fairly typical fact of life in cloud environments. – Derek Gusoff Mar 16 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.