Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

Sharepoint log files growing huge

$
0
0

Once again a SharePoint question :)

I ran the following script against our SharePoint 2013 farm:

#Specify the location of the CSV file here.
$r  = Import-Csv C:\folder\users.csv


foreach($i in $r){

	#The following line displays the current user.
	Write-Host "The URL is:"$i.Url
	#Disables the "Minimal Download Strategy" feature under "Site Features".
	#Disable-SPFeature -Identity "MDSFeature" -Url $i.Url -force -confirm:$false
	#Enables the "SharePoint Server Publishing" feature under "Site Features".
	Enable-SPFeature -Identity "PublishingSite" -Url $i.Url  -force -confirm:$false
	#Enables the "SharePoint Server Publishing Infrastructure" feature under "Site Collection Features".
	Enable-SPFeature -Identity "PublishingWeb" -Url $i.Url  -force -confirm:$false
}

The csv file that is being imported contains about 2000+ rows with users' MySite links where we want to en-/disable several features.

The script does what it is supposed to do, but while running the script and reaching user No. ~15 the log files under "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS" starts to grow huuuuuuge (~5GB).

They are mostly filled with this:

09/17/2014 11:04:27.72 	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	Potentially excessive number of SPRequest objects (18) currently unreleased on thread 6.  Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {D5F7BC80-8C88-4E17-9985-782F9724F2B9} Stack trace of current allocation:    at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)     at Microsoft.SharePoint.SPWeb.InitializeSPRequest()     at Microsoft.SharePoint.SPWeb.EnsureSPRequest()     at Microsof...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...t.SharePoint.SPWeb.SetAllowUnsafeUpdates(Boolean allowUnsafeUpdates)     at Microsoft.SharePoint.SPPageParserNativeProvider.<>c__DisplayClass1.<UpdateBinaryPropertiesForWebParts>b__0()     at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)     at Microsoft.SharePoint.SPPageParserNativeProvider.UpdateBinaryPropertiesForWebParts(Byte[]& userToken, Guid& tranLockerId, Guid siteId, Int32 zone, String webUrl, String documentUrl, Object& registerDirectivesData, Object& connectionInformation, Object& webPartInformation, IntPtr pWebPartUpdater)     at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUng...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...host, ISPEnableModuleCallback pModuleContext)     at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)     at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)     at Microsoft.SharePoint.SPModule.ActivateFromFeature(SPFeatureDefinition featdef, XmlNode xnModule, SPWeb web)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionModules(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boole...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...an fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)     at Microsoft.SharePoint.SPFeatureCollection.CheckSameScopeDependency(SPFeatureDefinition featdefDependant, SPFeatureDependency featdep, SPFeatureDefinition featdefDep...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...endency, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fMarkOnly)     at Microsoft.SharePoint.SPFeatureCollection.CheckFeatureDependency(SPFeatureDefinition featdefDependant, SPFeatureDependency featdep, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fMarkOnly, FailureReason& errType)     at Microsoft.SharePoint.SPFeatureCollection.CheckFeatureDependencies(SPFeatureDefinition featdef, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fThrowError, Boolean fMarkOnly, List`1& missingFeatures)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)     at Microsoft.SharePoint.S...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...PFeature.ActivateDeactivateFeatureAtSite(Boolean fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean fActivate, Guid featid, SPFeatureDefinition featdef, String urlScope, Boolean fForce)     at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject()     at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()     at System.Management.Automation.CommandProcessor.ProcessRecord()     at System.Management.Automation.CommandProcessorBase.DoExecute()     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automati...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...on.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)     at lambda_method(Closure , Object[] , StrongBox`1[] , InterpretedFrame )     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)     at System....	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)     at System.Management.Automation.Interpreter.ActionCallInstruction`6.R...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...un(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)     at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)     at System.Management.Automation.Intern...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...al.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()     at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()     at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)     at System.Threading.ThreadHelper.ThreadStart...	5b7cf973-1e3f-4985-bdf8-598eecf86ab6
09/17/2014 11:04:27.72*	PowerShell.exe (0x235C)                 	0x2B44	SharePoint Foundation         	Performance                   	naqx	Monitorable	...()  	5b7cf973-1e3f-4985-bdf8-598eecf86ab6

I tried finding something on the internet on this but either my Google Mojo is gone or there is no one else posting about this.

Since we do not want to change the logging behavior of SharePoint (unless it is really necessary), I'd like to know if there is something wrong with my code? Is there some parameter I can use to suspend logging for this script? There must be something I'm doing horribly wrong :(

Thanks in advance!

(If anything I posted is unclear please let me know since English isn't my first language)


EDIT: There is nothing productive happening on that farm. There is a web application for the MySites and one for a publishing portal (without any significant content).



Viewing all articles
Browse latest Browse all 26374

Trending Articles