Sp Requestallocation call stack logging in SharePoint
SPRequest call stack logging gives more detailed and useful information
to allow to diagnose the problem. It provides information about memory leaks,
issues in code part which are not captured in the ULS logs, event viewer. There
is no Impact of enabling the cal stack because it’s not going to reset or
restart any service. The only thing is, The size of the Log will be more.
Just copy
the following code into a file with the extension .ps1
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
$contentSvc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentSvc.CollectSPRequestAllocationCallStacks = $true
$contentSvc.Update()
$contentSvc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentSvc.CollectSPRequestAllocationCallStacks = $true
$contentSvc.Update()
To disable
SPRequest allcoation callstack logging after you completed testing just replace
$true with $false:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
$contentSvc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentSvc.CollectSPRequestAllocationCallStacks = $false
$contentSvc.Update()
$contentSvc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentSvc.CollectSPRequestAllocationCallStacks = $false
$contentSvc.Update()
To start the
power shell scripts please open the SharePoint 2010 Management Shell,
switch to the directory where you stored the ps1 files and start them using the
following syntax:
PS>
.\EnableSPRequestCallstacks.ps1
I hope the above information will help you to resolve the issue, in case of any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.
No comments:
Post a Comment
Your feedback is Much Appreciated. I will try to reply to your queries as soon as possible!!Anil Avula