none
Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them

    Question

  • 1)Create "Blank" Site collection (http://sp2010/sites/blanksite)

    2)Activite "SharePoint Server Publishing Infrastructure" feature under site collection feature

    3)Create Blank Web SubSite (http://sp2010/sites/blanksite/subsite)

    4)Activate "SharePoint Server Publishing" under sub website's site setting

     "Detected use of SPRequest for previously closed SPWeb object." Error message to show up on ULSViewer right after I activate the service under site setting.

    Is this a major memory leak issue? does it affect the overall performance and stability of the system?

    Is there a fix for the issue

    The exact eroor is:

    Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace:

     

    at Microsoft.SharePoint.SPWeb.get_ThemedCssFolderUrl()

     

    at Microsoft.SharePoint.Publishing.ThemedCssFolderUrlProperty.GetDirectValue(SPWeb web)

     

    at Microsoft.SharePoint.Publishing.InheritableProperty`1.SetInherit(Boolean inherit, Boolean forceAllSubWebInherit, String successUrl, String failureUrl, Boolean& updateRequired)

     

    at Microsoft.SharePoint.Publishing.InheritableProperty`1.SetInherit(Boolean inherit, Boolean forceAllSubWebInherit, Boolean& updateRequired)

     

    at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.SetLayoutRelatedProperties(PublishingWeb area, Boolean& updateRequired)

     

    at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.InitializePublishingWebDefaults()

     

    at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.Provision()

     

    at Microsoft.SharePoint.Publishing.PublishingFeatureHandler.<>c__DisplayClass3.<FeatureActivated>b__0()

     

    at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code)

     

    at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithWebCulture(SPWeb web, CodeToRun webCultureDependentCode)

     

    at Microsoft.SharePoint.Publishing.PublishingFeatureHandler.FeatureActivated(SPFeatureReceiverProperties receiverProperties)

     

    at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

     

    at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)

     

    at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)

     

    at Microsoft.SharePoint.SPFeatureCollection.CheckSameScopeDependency(SPFeatureDefinition featdefDependant, SPFeatureDependency featdep, SPFeatureDefinition featdefDependency, 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.CheckFeatureDependencies(SPFeatureDefinition featdef, Boolean fActivateHidden, Boolean fUpgrade, Boolean fForce, Boolean fMarkOnly)

     

    at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)

     

    at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)

     

    at Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope)

     

    at Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, SPFeatureDefinitionScope featdefScope)

     

    at Microsoft.SharePoint.WebControls.FeatureActivatorItem.BtnActivateFeature_Click(Object objSender, EventArgs evtargs)

     

    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

     

    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

     

    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

     

    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    at System.Web.UI.Page.ProcessRequest()

     

    at System.Web.UI.Page.ProcessRequest(HttpContext context)

     

    at ASP._layouts_managefeatures_aspx.ProcessRequest(HttpContext context)

     

    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

     

    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

    at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)

     

    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)

     

    at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

     

    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

     

    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

     

    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

     

    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

    Friday, December 09, 2011 1:04 AM

Answers

  • Hi,

     

    What’s your SharePoint server’s version? Based on my local test, I can activate "SharePoint Server Publishing" under sub website's site setting without any error. My SharePoint server’s version is RTM(14.0.4762.1000).

     

    Or you can open a new paid support case with Microsoft for further analysis.

     

    Thanks,

    Rock Wang


    Regards, Rock Wang Microsoft Online Community Support
    • Marked as answer by Rock Wang– MSFT Friday, December 16, 2011 9:00 AM
    • Unmarked as answer by Raul133 Friday, December 16, 2011 9:57 PM
    • Marked as answer by Raul133 Friday, December 16, 2011 10:09 PM
    • Unmarked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Marked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Unmarked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Proposed as answer by JD Wade, MCTS, MCITP Tuesday, December 20, 2011 10:02 PM
    • Edited by Rock Wang– MSFT Friday, December 30, 2011 6:46 AM
    • Marked as answer by Rock Wang– MSFT Friday, December 30, 2011 6:46 AM
    Wednesday, December 14, 2011 9:30 AM

All replies

  • Hi,

     

    What’s your SharePoint server’s version? Based on my local test, I can activate "SharePoint Server Publishing" under sub website's site setting without any error. My SharePoint server’s version is RTM(14.0.4762.1000).

     

    Or you can open a new paid support case with Microsoft for further analysis.

     

    Thanks,

    Rock Wang


    Regards, Rock Wang Microsoft Online Community Support
    • Marked as answer by Rock Wang– MSFT Friday, December 16, 2011 9:00 AM
    • Unmarked as answer by Raul133 Friday, December 16, 2011 9:57 PM
    • Marked as answer by Raul133 Friday, December 16, 2011 10:09 PM
    • Unmarked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Marked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Unmarked as answer by Raul133 Tuesday, December 20, 2011 12:19 AM
    • Proposed as answer by JD Wade, MCTS, MCITP Tuesday, December 20, 2011 10:02 PM
    • Edited by Rock Wang– MSFT Friday, December 30, 2011 6:46 AM
    • Marked as answer by Rock Wang– MSFT Friday, December 30, 2011 6:46 AM
    Wednesday, December 14, 2011 9:30 AM
  • Hi Rock,

    Thank you for replying.

    After provisioning the STS the issue did not reproduce.

    Just being curious, in my stack trace what indicated that it was an issue with the STS?

    Looking forward to your reply.

     

    Thanks,

    Raul

     

    Friday, December 16, 2011 10:16 PM
  • Hi Rock,

    I got the same error again after monitoring the logs for some more time.

    Also observed that i get the same error even when i activate the SharePoint server Publishing infrastructure on the root blank site.

    Then we created a new site collection using the team site template and then activated the SharePoint server Publishing infrastructure.

    The same error pops up in the ULS logs.

    Tuesday, December 20, 2011 6:23 PM
  • Hi,

     

    What’s your SharePoint server’s version? Based on my local test, I can activate "SharePoint Server Publishing" under sub website's site setting without any error. My SharePoint server’s version is RTM(14.0.4762.1000).

     

    Or you can open a new paid support case with Microsoft for further analysis.

     

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support
    Friday, December 30, 2011 6:46 AM