I have configured sandbox web part for SharePoint online site.. I have used user context to get the details from the different lists across site collection.

After having 7-8 different sessions, sandbox web-part seems to be broken and giving error 'resource usage by web-part exceeded the limit'.

1 Answer 1


The way to restrict sandbox solutions from using resources is to make them run less or run more efficiently; there is no way to artificially "make" them use less resources than they actually consume without access to the Server Object Model (not available in SharePoint Online).

You can find more about how resource limits are defined on MSDN, the article references SharePoint Server 2010 but the limits are defined and work the same way on SharePoint online.

If only 7-8 sessions is enough to consume up to the resource limit on your site collection (which defaults to 300), then your webpart is taking A LOT of effort to gather the resources from your various lists.

Custom code in Sandbox solutions is actually deprecated going forward, so I would strongly suggest you develop any solutions you need using the add-in development model and/or the Javascript implementation of the Client Side Object Model (JSOM) or the REST API. You may also find a search based solution fits your scenario nicely

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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