Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When deleting 1000+ (link) items from a list in one batch using the COM, I encountered this exception :

Microsoft.SharePoint.Client.ServerException: The request uses too many resources

It seems that there is a limitation for the request size. This page has some details.

After some trial and error and help from that webpage above, I found out that the maximum number of deletions (in one batch) is 252. However I did not find the maximum number of new ListItem additions in one batch, so I decided to limit this to 100 in my code.

Is there a way to determine this or is there any documentation on this topic ?

share|improve this question
add comment

2 Answers

The limit of items to be accessed in one call by the Client Object Model is defined by the SPWebApplication.ClientCallableSettings.MaxObjectPaths property. This applies to Add, Delete and Update operations too.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.clientcallablesettings.aspx

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spclientcallablesettings.maxobjectpaths.aspx

It is set by default to 256 and you can change it if you have access to the WebApplication. Here is how to change it: http://ojasmaru.blogspot.in/2013/03/error-in-sharepoint-2010-client-object.html

share|improve this answer
add comment

I've found a post on msdn that explains the request limits on the bottom of the page.

http://msdn.microsoft.com/en-us/library/office/jj163082.aspx

SharePoint has a 2 MB limit for an operations request, and a 50 MB limit for the size of a submitted binary object. The request size is limited to protect the server from excessively long queues of operations and from processing delays for large binary objects. For example, if you use the CSOM to create a project, and then edit the project to add 252 tasks with a minimum amount of information such as a short name, the task GUID, and a duration of 1d, the total amount of data in the DraftProject.Update request is less than 2 MB. But, if you try to add 253 such tasks to an empty project, the 2 MB limit is exceeded, and you get the following exception: Microsoft.SharePoint.Client.ServerException: The request uses too many resources

share|improve this answer
    
Can you please add an abstract from the link to make your answer more valuable :) –  Robert Lindgren Jul 31 '13 at 10:30
    
I added an abstract from the link :) –  Marlou Jul 31 '13 at 10:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.