SharePoint: Increasing sandbox/solution execution timeout using Powershell
Poor sandbox solutions!
They have been great comrad in time of chaos where deploying a farm solution would take months. But these little saviour have be deprecated. This means that the functionality will still be available for use in SharePoint 2013, but primarily for backwards compatibility with existing solutions built using the sandbox solution approach.
First of all load the SharePoint powershell snap. To do that we need to run this command in the powershell command prompt just once.The command to load the SharePoint powershell snap in is as follows.
Add-PSSnapin Microsoft.SharePoint.Powershell
Then to check what is current status of the resource porting and time is:
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint
Now run assign values to these attributes, run the following command:
$uc=[Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit = 60
$uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint = 150
$uc.ResourceMeasures["CPUExecutionTime"].Update()
$uc.Update()
Now Launch PowerShell
PS> cd C:\my_path\ (enter)
Execute the script:
PS> .\run_import_script.ps1 (enter)
References:
They have been great comrad in time of chaos where deploying a farm solution would take months. But these little saviour have be deprecated. This means that the functionality will still be available for use in SharePoint 2013, but primarily for backwards compatibility with existing solutions built using the sandbox solution approach.
Add-PSSnapin Microsoft.SharePoint.Powershell
Then to check what is current status of the resource porting and time is:
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit
Write-Host $uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint
Now run assign values to these attributes, run the following command:
$uc=[Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$uc.ResourceMeasures["CPUExecutionTime"].AbsoluteLimit = 60
$uc.ResourceMeasures["CPUExecutionTime"].ResourcesPerPoint = 150
$uc.ResourceMeasures["CPUExecutionTime"].Update()
$uc.Update()
Now Launch PowerShell
PS> cd C:\my_path\ (enter)
Execute the script:
PS> .\run_import_script.ps1 (enter)
References:
- http://blogs.msdn.com/b/johnwpowell/archive/2010/03/01/a-lap-around-sharepoint-2010-sandboxed-solutions-resource-quotas.aspx
- http://social.technet.microsoft.com/Forums/sharepoint/en-US/915bb54f-d8b3-4e4d-a334-584a26464446/joining-list-in-sandbox-solution-timeout-while-waiting-for-request-to-complete-within-the?forum=sharepointgeneralprevious
- http://sharepoint2010developer.blogspot.de/2011/07/powershell-command-to-access.html
- http://charulbhargava.blogspot.de/2012/05/modify-sandbox-codesolution-execution.html
Comments
Post a Comment