Default value of sandbox code/solution execution timeout is 30 seconds, there are times when one needs to increase this value to get complex code executed.
To view execution timeout value use following PS command-:
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint
To Modify above values use the following PS Commands-:
For more information on sandbox solutions refer to the this link.
To view execution timeout value use following PS command-:
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint
To Modify above values use the following PS Commands-:
- Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
- $uc=[Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit = <LimitValue>$uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint = <PointValue>$uc.ResourceMeasures["CPUExecutionTime"].Update()$uc.Update()
- <LimitValue> is the new maximum limit value.
- <PointValue> is the new number of resources per resource point.
For more information on sandbox solutions refer to the this link.
Super Scirpt Save my day
ReplyDeleteGlad that script came to your help.
Delete