Sunday, March 10, 2013

Error in SharePoint 2010 Client Object Model - The request uses too many resources

 

Recently one of our customer faced a weird error “The request uses too many resources”. Everything works fine on my dev & testing environment but its that one customer who faces this error in a module which is implemented using SharePoint Client OM.

On further analysis I found that the error was from the fact that too many commands are sent in one ExecuteQueryAsync call. SharePoint sets a limit of 256 objects in one ExecuteQueryAsync call. This can be confirmed from following powershell call

Get-SPWebApplication | %{$_.ClientCallableSettings}

4d1qod04

This can be easily updated using powershell commands

$webApp = Get-SPWebApplication "site"
$webApp.ClientCallableSettings.MaxObjectPaths = 2000
$webApp.Update()

Once above powershell was run my customer was able to get past that error and use the module.

No comments:

Post a Comment