SharePoint Sandboxed Solutions: Performance problems / unstable services

On one of our SharePoint Servers, we got a problem on activating a Sandboxed solution in a SiteCollection. The following error occurs: The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request.

18 March 2011
Christoph Keller Christoph Keller

On one of our SharePoint Servers, we got a problem on activating a Sandboxed solution in a SiteCollection.
The following error occurs:

The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request.

After some googling around, I found the following page, which gives a overview about what a sandbox does exactly:
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=318

Now, I used the following PowerShell script on the server, to update the property MaximumWorkerProcesses:

$sandbox = [microsoft.sharepoint.administration.spusercodeservice]::local
$sandbox.Tiers[""].MaximumWorkerProcesses = 5
$sandbox.Tiers[""].Update()

After this change, I restarted the "Microsoft SharePoint Foundation Sandboxed Code Service" and tried to activate the solution again, and voila, the solution was runing.

So be aware of the fact, that the Sandboxed Code Service is by default configured to use one Tier with one WorkerProcess which accepts one connection (what is really too less if you only have one Sandbox-Server, to run any solution on it!).


comments powered by Disqus