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

sharepoint-2010

I am working with SharePoint 2010 server. I have deployed a sandboxed solution to the sharepoint server. But while adding the webpart to page it shows the error like below.

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

I found below article and followed all the work around, but the error is still persisting.

http://blogs.msdn.com/b/sharepointdev/archive/2011/02/08/error-the-sandboxed-code-execution-request-was-refused-because-the-sandboxed-code-host-service-was-too-busy-to-handle-the-request.aspx

Can anyone tell me what am I missing or what I have to do in order to get rid of this exception?

Best Answer

We've had to do this, too:

$uc = [Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$uc.WorkerProcessExecutionTimeout = 5000
$uc.Update()

$tier = $uc.Tiers[""]   # default Tier has no Name
$tier.MaximumWorkerProcesses = 2    # number of CPU Cores + 1
$tier.Update()
Related Topic