Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
SharePoint 2013 Apps, Load Testing and Resources throttling - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2015-05-06

If you are building a SharePoint 2013 Apps you will need at some point in your development lifecycle to do load testing for your app to see how it will behave under big user load especially if you are building LOB application that you expect to have a big load.

This is great but the problem with that is you may receive the below error at your testing tool at high user load:
HTTP/1.1 429 Too Many Requests
You may say okay it’s the http throttling then you go to the central administration site close it and retest then you get the same error again.

But if you dig more in the uls you will find the below error:
ResourceBudgetExceeded, sending throttled status code. Exception=Microsoft.SharePoint.SPResourceBudgetExceededException: ResourceBudgetExceeded at Microsoft.SharePoint.SPResourceTally.Check(Int32 value) at Microsoft.SharePoint.SPAggregateResourceTally.Check(SPResourceKind kind, Int32 value) at Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest()

Okay what is this?! this is another validation and throttling the SharePoint team added specially to the SP APPs and in the current situation it checks the time for the request that the app makes to the client.svc service (CSOM Calls) and if its bigger than 150,000Milliseconds your app CSOM request will be blocked and throttled.

So what can you do now?!:

1- You can review your app code and try to optimize it to bypass this throttling.

2- You can say okay I know that my performance lab has small resources and at production I will be in a good servers which will work faster and I just need to increase this 150 MS limit, okay no problem just use the below PowerShell:

$webapp = Get-SPWebApplication -Identity http://<URL of your on-premises farm>
$webapp.AppResourceTrackingSettings.Rules.Add(
[Microsoft.SharePoint.SPResourceKind]::ClientServiceRequestDuration, 300000, 300000)

3- What if you need to just disable it? this is also very easy:

$webapp = Get-SPWebApplication -Identity http://<URL of your on-premises farm>
$rule = $webapp.AppResourceTrackingSettings.Rules.Get(
[Microsoft.SharePoint.SPResourceKind]::ClientServiceRequestDuration)
$rule.Remove()

Finally, I hope that this post save you some time while you are doing your load testing for the SP2013 APPs

Original Posthttps://mahmoudhamed.wordpress.com/2014/05/06/sharepoint-2013-apps-load-testing-and-resources-throttling/

(Visited 235 times, 1 visits today)

About the author 

Mahmoud Hamed Mahmoud

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.