I have Http triggered Azure functions that interacts with SharePoint Online using Microsoft Graph SDK, the solution has been in production for couple of years - it creates documentsets/uploads files/updates metadata etc.,. In past month or so it appears that the http calls are taking more than usual time to complete (and failing). Below is one such example,
- The Graph api calls are retried multiple times (exponential back-off) due to gateway timeout errors (504 response).
- The first 3 Graph calls terminates around 30 seconds due to 504.
- The last Graph call errors out with 409 - eTag mismatch error,
resourceModified Message: The resource has changed since the caller last read it; usually an eTag mismatch Inner error: AdditionalData: date: 2023-03-01T11:21:53 request-id: 570d092f-8980-44f1-a1a1-8d5185e6006a client-request-id: 570d092f-8980-44f1-a1a1-8d5185e6006a ClientRequestId: 570d092f-8980-44f1-a1a1-8d5185e6006a 4) We believe the number of calls are within the throttling threshold.
Questions:
- Why are Graph API calls are terminating at 30th second? Is this a default setting of the Graph SDK? If so, is it recommended to change?
- How to avoid eTag mismatch error while updating metadata, or, uploading files? In our use case, all operations are replace of existing data. (Note: We have observed this error in scenarios where there is only one call targeting an item in SharePoint i.e., no real reason for mismatch.)
- Is there a way to determine which applications is contributing to hitting throttling threshold? As per my analysis there is no reason for SPO to throttle request (no. of requests is within the allowed limit as per the user licenses that our org. has), which team from Microsoft/SharePoint can assist us in troubleshooting this issue.