Troubleshooting: The remote server returned an error: (429) returned from SharePoint to K2
kbt171536
PRODUCTIssue
K2 SmartForms / SharePoint Online app occasionally displays a 429 error. The error occurs on two different SharePoint sites on the same tenant tied to different K2 servers.
Symptoms
- 429 errors appears in the K2 SmartForms / SharePoint Online app
- The error occurs on two different SharePoint sites on the same tenant tied to different K2 servers.
Troubleshooting Steps
The following can be tried/verified in this scenario:
- When K2 4.7 is used, a large number of requests to SharePoint can be generated by identity resolving through SharePoint group providers. The new SyncEngine, introduced in newer versions of the platform significantly improves and optimizes identity resolving. It is recommended to upgrade K2 to at least K2 5.2 May CU with the latest FP or 5.3 with the latest FP, and enable the SyncEngine.
- You can consider removal of any unused/unnecessary SharePoint group providers (if you have any).
- As error messages occurs due to the fact that K2 is getting throttled by SharePoint Online, you can consider increasing the SharePoint Online Server Resource Quota settings for your SharePoint Online site collections integrated with K2.
You can also edit settings in the: SourceCode.SmartObjects.Services.SharePoint.dll.config file (default location is "C:Program Files (x86)K2ServiceBroker") and increase the retry period for SharePoint calls.
Change the DelayMilliSeconds value from default 100 to a larger value, let's say to 1000 and restart the K2 service. After making this change, monitor system behavior to see if it improves the situation with the 429 error from SP. If it won't disappear completely try to see if its frequency drops. You can consider increasing the DelayMilliSeconds value even more (1000 is 1 second, so you can go up for 10000 maybe or higher). - You can also consider increasing the SharePoint Online site collection resource quota. Please see "Manage SharePoint Online server resource quotas."