SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1.01k forks source link

Throttling occurring with 429 error code #8347

Open BennieOL opened 2 years ago

BennieOL commented 2 years ago

Good day, we are experiencing throttling issues with SharePoint utilising Logicapps, the issue appears to occur from the back end side which in this case is SharePoint. it is using the invokequery. We noted in the Microsoft throttling documentation that it may be possible to uitilise the Microsoft Graph API over CSOM and reset APi, if this is the case would this assist with throttling or would we need to explore another option.

I have been directed to report to the developers directly via here for further assistance in our request.

Kind regard sample of the error s

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

BennieOL commented 2 years ago

Good day

Any feedback on this request?

Kind regards

CallumCrowley commented 2 years ago

@BennieOL I would recommend that you read Microsoft's documentation on avoiding throttling or getting blocked in SharePoint Online. There are a number of headers which your developers can utilise in ensuring they aren't throttled by SharePoint Online, including the Retry-After and RateLimit headers to ensure that your requests do not trigger throttling. Additionally, you can decorate your HTTP traffic which will prioritise it over traffic which hasn't been properly decorated.

BennieOL commented 2 years ago

Good day Callum

Thank you, could you possibly answer the below or point us in the direction, we are trying to get to the root cause of the failures, some of the logic apps already have retry headers and it does not appear to be helping much.

With regards to the license count, does this include any free license tiers or does this only count towards paid for licenses or does this fall under a certain tier and above only?

Would it be possible to get any logs on SharePoint which shows #of calls, which will indicate if we hit throttling limit or where it is being hit

Kind regards

CallumCrowley commented 2 years ago

Have you also exhausted the other suggestions?

If you are building an application, ensure you are using app-only context to authenticate with SharePoint.

BennieOL commented 2 years ago

Hi

The original request here was related to this point:

There is no way to reduce the number as firstly we don't how many requests are being made or from which accounts as no one has been able to provide this information and secondly we cant ask the client to ask their clients to reduce their business dealings.

Retry appears to be active as per some of the logs on the apps however it does not appear to be helping in this case.

How does the decorate traffic work and how does it help us?

Kind regards

Bennie Olivier | SharePoint Guru Email: @. GTconsult accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. From: Callum Crowley @.> Sent: Friday, 05 August 2022 14:57 To: SharePoint/sp-dev-docs @.> Cc: Bennie Olivier @.>; Mention @.***> Subject: Re: [SharePoint/sp-dev-docs] Throttling occurring with 429 error code (Issue #8347)

Have you also exhausted the other suggestions?

If you are building an application, ensure you are using app-only context to authenticate with SharePoint.

- Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fissues%2F8347%23issuecomment-1206425921&data=05%7C01%7Cbennie%40gtconsult.com%7Cb0bdbbdfb4fa405ea83c08da76e1f1ef%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953010072868999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=o8sZnOXg%2FBFM%2BJVEOEMru7OGeQmeR%2FmsmssuYy9Ze4M%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2K2C6TRCXVWHTWVNO7NILLVXUFQRANCNFSM55LFWK5Q&data=05%7C01%7Cbennie%40gtconsult.com%7Cb0bdbbdfb4fa405ea83c08da76e1f1ef%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953010072868999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=I%2FsG88pzErhoZOR8lMw8cWqDpeqlN6pIJSMacqjjfYk%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

CallumCrowley commented 2 years ago

It's very unlikely that throttling is being caused by ordinary users using SharePoint.

This means, that if you are building an application that consumes SharePoint resources, then use Microsoft Graph API endpoints over older CSOM/SharePoint REST APIs where possible.

If HTTP 429 errors are being returned to applications you have created, then it is indeed those apps which are causing the throttling. Your app needs to wait until the time specified by the Retry-After header has elapsed before making the request again. Additionally, I would recommend exhausting the other options regarding e.g.

Please read the documentation for information on decorated traffic, again this is related to third party applications or applications you have created decorating the traffic they send to SharePoint.

BennieOL commented 2 years ago

Hi

Is there any logs or any way to see where the usage is occurring on the back end?

Kind regards

Bennie Olivier | SharePoint Guru Email: @. GTconsult accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. From: Callum Crowley @.> Sent: Friday, 05 August 2022 15:14 To: SharePoint/sp-dev-docs @.> Cc: Bennie Olivier @.>; Mention @.***> Subject: Re: [SharePoint/sp-dev-docs] Throttling occurring with 429 error code (Issue #8347)

It's very unlikely that throttling is being caused by ordinary users using SharePointhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fsharepoint%2Fdev%2Fgeneral-development%2Fhow-to-avoid-getting-throttled-or-blocked-in-sharepoint-online%23user-throttling&data=05%7C01%7Cbennie%40gtconsult.com%7Ccc41fd57c9814b8e502f08da76e4565e%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953020350939153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0LVwPs1TzedcWu9vtPxHjsGpltfyNt79LPWK5rVbbqg%3D&reserved=0.

This means, that if you are building an application that consumes SharePoint resources, then use Microsoft Graph API endpoints over older CSOM/SharePoint REST APIs where possible.

If HTTP 429 errors are being returned to applications you have created, then it is indeed those apps which are causing the throttling. Your app needs to wait until the time specified by Retry-After header has elapsed before making the request again. Additionally, I would recommend exhausting the other options regarding e.g.

Please read the documentation for information on decorated traffichttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fsharepoint%2Fdev%2Fgeneral-development%2Fhow-to-avoid-getting-throttled-or-blocked-in-sharepoint-online%23how-to-decorate-your-http-traffic&data=05%7C01%7Cbennie%40gtconsult.com%7Ccc41fd57c9814b8e502f08da76e4565e%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953020350939153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=E636KAUj%2Fh%2F7X7t7STt3FrT0gaVhJp8d99bdwBnlMEI%3D&reserved=0, again this is related to third party applications or applications you have created decorating the traffic they send to SharePoint.

- Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-docs%2Fissues%2F8347%23issuecomment-1206446014&data=05%7C01%7Cbennie%40gtconsult.com%7Ccc41fd57c9814b8e502f08da76e4565e%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953020350939153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DgjSs3NNPJA1C959d%2B8WpWmusRG2w7ifpaRY2ApMR1s%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2K2C6S4DM5NUANPLUUQEJ3VXUHQZANCNFSM55LFWK5Q&data=05%7C01%7Cbennie%40gtconsult.com%7Ccc41fd57c9814b8e502f08da76e4565e%7C61521a125ef94e8db880ea83395070fb%7C0%7C0%7C637953020350939153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yw69TWYMn%2FloFOuzD2Z3VQ8Lzh55OP22gmBID9Np97c%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

CallumCrowley commented 2 years ago

You will need to contact Microsoft support since we do not have access to the server side logs.