SharePoint Online Throttling
This FAQ applies if you are getting one of these following errors:
The remote server returned an error: (429)
The server Indicated an exceedance of the request-size limit
Executing CSOM query on sharepoint failed: The operation has timed out Attempt to retry in 5000 ms. # attempt(s) left.
Error while inserting new element: The remote server returned an error: (503) Server Unavailable.
What is the cause?
This error is raised by SharePoint in case it gets overwhelmed by all the requests and rejects further request sent from the Layer2 Cloud Connector to maintain optimal performance and reliability of the SharePoint Online service. This is called “throttling”, it limits the number of user actions or concurrent calls (by script or code) to prevent overuse of resources.
These are the common setups that can lead to this:
- Too many different connections for different lists all running at the same time
- Too many different connections for the same list running the same time
The Layer2 Cloud Connector handles throttling by itself. Affected records will be skipped and the sync proceeds with the remaining ones. With the next sync those skipped records will then be pick up again.
Additionally, with Layer2 Cloud Connection version 18.104.22.168 we added HTTP request decoration as recommended by Microsoft. They stated that, although it will not prevent you from it, it will reduce the risk of being throttled. In case you are working with a version prior to that we advise you to upgrade.
How to avoid it?
To avoid throttling we always advise our users to stagger their jobs and to make sure that an appropriate interval is used so that one job can finish before the next one starts.
Additionally to that, Microsoft published an article on how to avoid getting throttled or block in SharePoint Online that is worth a read.
Need more help?
For additional help with errors, please contact [email protected].