<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx</link><description>In an earlier article I have discussed that all SPSite and SPWeb (and potentially also PublishingWeb) objects need to be properly disposed to avoid memory pressure situations. Roger Lamb has a nice summary of coding patterns which will actually cause</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3051624</link><pubDate>Wed, 07 May 2008 17:57:38 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3051624</guid><dc:creator>Emmanuel Desigaud</dc:creator><description>&lt;p&gt;Extremely useful as usual !! Thanks !!&lt;/p&gt;</description></item><item><title>Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3055388</link><pubDate>Thu, 15 May 2008 05:18:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3055388</guid><dc:creator>Bobby Habib SharePoint &amp; MOSS Blogging Space</dc:creator><description>&lt;p&gt;Just wanted to make the community aware of a new blog just written by Stefan Gobner (EE Engineer at Microsoft&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3055803</link><pubDate>Thu, 15 May 2008 21:18:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3055803</guid><dc:creator>Alex Dresko</dc:creator><description>&lt;p&gt;I do not have that particular key in my entire registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions is there, but HeapSettings is not. Can I safely create that structure? &lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3055820</link><pubDate>Thu, 15 May 2008 21:46:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3055820</guid><dc:creator>Tim C</dc:creator><description>&lt;p&gt;Some of those best practices require you to know that an INTERNAL method call is made which creates a web that you are in charge of disposing of, e.g., SPList.BreakRoleInheritance(). How can you possibly know to call list.ParentWeb.Dispose(); after you call BreakRoleInheritance? Why doesn't SPList just implement IDisposable? If it has objects that need to be disposed? Isn't that the proper pattern for IDisposable?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3055863</link><pubDate>Thu, 15 May 2008 23:44:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3055863</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;yes you need to cretae this key and the DWORD value below it.&lt;/p&gt;
&lt;p&gt;They do not exist after installing the product.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3055866</link><pubDate>Thu, 15 May 2008 23:45:45 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3055866</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;there is always room for improvement.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>Properly Disposing of SharePoint API Objects</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3056333</link><pubDate>Fri, 16 May 2008 18:23:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3056333</guid><dc:creator>Tony Testa's World</dc:creator><description>&lt;p&gt;Properly Disposing of SharePoint API Objects&lt;/p&gt;
</description></item><item><title>Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062000</link><pubDate>Wed, 28 May 2008 08:58:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062000</guid><dc:creator>Shared Points for SharePoint...</dc:creator><description>&lt;p&gt;Stefan Gossner has published a great article on the subject: In an earlier article I have discussed that&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062058</link><pubDate>Wed, 28 May 2008 11:19:45 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062058</guid><dc:creator>Kristian Kjær</dc:creator><description>&lt;p&gt;Hi Stefan&lt;/p&gt;
&lt;p&gt;Excellent article. I was going crazy over the intensive logging for no reason! I have a question though regarding the sitemapprovider. I use the standard CurrentNavSiteMapProvider from the publishing infrastructure. How can I limit this to say 2 levels? I can set the StaticDisplayLevels in my Menu control, but as I read your article, this will not reduce the creation of SPWeb objects? I have to make the CurrentNavSiteMapProvider reduce this creation by telling it to go only two levels deep. Or am I missing something?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062103</link><pubDate>Wed, 28 May 2008 13:12:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062103</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Kristian,&lt;/p&gt;
&lt;p&gt;I was talking about the StaticDisplayLevels and DynamicDisplayLevels settings of the navigation controls.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062113</link><pubDate>Wed, 28 May 2008 13:35:13 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062113</guid><dc:creator>Kristian Kjær</dc:creator><description>&lt;p&gt;But does this mean that by using StaticDisplayLevels and DynamicDisplayLevels I also limits the creation of SPWebs?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062131</link><pubDate>Wed, 28 May 2008 14:20:21 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062131</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Kristian,&lt;/p&gt;
&lt;p&gt;the answer is yes. The site map provider does not create any objects on its own. Only if being asked for nodes from the navigation control it will create these objects. And the navigation control decides to which level this will be retrieved and that means the navigation control decides how many objects are created.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3062199</link><pubDate>Wed, 28 May 2008 17:52:16 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3062199</guid><dc:creator>Kristian Kjær</dc:creator><description>&lt;p&gt;Cool. Thanks for the good (and fast!) answers. As I said, it (the answers and the blog) has really clarified things!&lt;/p&gt;</description></item><item><title>SharePoint (Coding) und Speicherverwaltung</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3071469</link><pubDate>Sun, 15 Jun 2008 21:25:33 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3071469</guid><dc:creator>Marco Scheel aka GeekDotNet</dc:creator><description>&lt;p&gt;Folgende Artikel behandeln das Thema oder die Auswirkung: Best Practices: Using Disposable Windows SharePoint Services Objects &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/aa973248.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa973248.aspx&lt;/a&gt; Best Practices: Common Coding Issues When Using the SharePoint Object&lt;/p&gt;
</description></item><item><title>Troubleshooting SPSite/SPWeb leaks and the Importance of Loadtesting</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3077290</link><pubDate>Tue, 24 Jun 2008 20:08:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3077290</guid><dc:creator>Mirrored Blogs</dc:creator><description>&lt;p&gt;Stefan has a good article on troubleshooting leaks in your WSS and MOSS applications. One of the very&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3077419</link><pubDate>Tue, 24 Jun 2008 23:57:59 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3077419</guid><dc:creator>Markus</dc:creator><description>&lt;p&gt;Very great article.&lt;/p&gt;
&lt;p&gt;But how can i create a complete sitemap if I have a publishing site?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3080847</link><pubDate>Mon, 30 Jun 2008 15:16:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3080847</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;you can (e.g.) create a console application which enumerates the whole site structure and creates the XML file which can then be used by the standard ASPNET XML sitemap provider.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3084726</link><pubDate>Mon, 07 Jul 2008 08:49:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3084726</guid><dc:creator>Michael</dc:creator><description>&lt;p&gt;And what about security trimming about the single sitemapnodes when creating a sitemap in an XML file and use it as sitemap provider? I think this cannot be done easily... :(&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3084737</link><pubDate>Mon, 07 Jul 2008 09:15:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3084737</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Michael,&lt;/p&gt;
&lt;p&gt;you are correct. This approach is good for anonymous sites or site where no security trimming is required.&lt;/p&gt;
&lt;p&gt;For sites where security trimming is required you either have to ensure that the tree structure is not very complex or you should look for a 64-bit machine where more memory can be made available per worker process.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>Stefan Goßner : Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3095795</link><pubDate>Wed, 30 Jul 2008 17:55:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3095795</guid><dc:creator>SharePoint Thinks, Links and Clinks</dc:creator><description>&lt;p&gt;Another holding post that I need to get back to. Excellent read! Stefan Go&amp;#223;ner : Troubleshooting SPSite/SPWeb&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3103720</link><pubDate>Tue, 12 Aug 2008 02:14:48 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3103720</guid><dc:creator>JDP</dc:creator><description>&lt;p&gt;So &amp;nbsp;what is the GUID in the Allocation ID? Is that a feature GUID?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3103893</link><pubDate>Tue, 12 Aug 2008 09:51:17 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3103893</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi JDP,&lt;/p&gt;
&lt;p&gt;no this is not the feature ID. It is a GUID generated at the momement when the object is allocated in memory. So you cannot use it to track it down to anything on the file system.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3105423</link><pubDate>Thu, 14 Aug 2008 01:27:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3105423</guid><dc:creator>JDP</dc:creator><description>&lt;p&gt;Thank you, Stefan. A client's server has these errors on rare occasion, and it's quite difficult to pinpoint their origin. It would be quite helpful if some technical information could be included in the error to facilitate analysis.&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3105686</link><pubDate>Thu, 14 Aug 2008 12:19:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3105686</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi JDP,&lt;/p&gt;
&lt;p&gt;which error do you mean? The SPRequest leak?&lt;/p&gt;
&lt;p&gt;Actually using the steps above you have the complete callstack of the allocation! That is all technical information you need to pinpoint the piece of code that causes the problem.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3105874</link><pubDate>Thu, 14 Aug 2008 19:40:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3105874</guid><dc:creator>JDP </dc:creator><description>&lt;p&gt;To clarify -- it's surprising that event tells you how to get the stack, rather than providing it explicitly.&lt;/p&gt;
&lt;p&gt;Adding the reg key does work great, and helps, but IMHO the logging behavior provided by the reg key should be the &amp;quot;out of the box&amp;quot; setting.&lt;/p&gt;
&lt;p&gt;And since I haven't said it yet -- thanks for writing this! You're one of the most knowledgeable resources around.&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3131915</link><pubDate>Fri, 03 Oct 2008 17:24:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3131915</guid><dc:creator>Alex Hekstra</dc:creator><description>&lt;p&gt;Stefan,&lt;/p&gt;
&lt;p&gt;Thanks for this great insight. The problem has been nagging me since ages...&lt;/p&gt;
&lt;p&gt;I do have a problem. I've developed a webpart that pulls information from the parent web. When the webpart is initialised, I use SPContext.Current to get the web, and from that I get the parent SPWeb. During CreateChildControls, I build a UI with the information. During post back handling, the web references are used too. Probably just after rendering I could dispose the sharepoint objects.&lt;/p&gt;
&lt;p&gt;I understand that I cannot Dispose() the current web as it is owned by the webpart manager or page, and I need to Dispose() the parent web because I referenced it.&lt;/p&gt;
&lt;p&gt;Now here is my problem. If I have second webpart that also references the parent web, I don't know when to free it.&lt;/p&gt;
&lt;p&gt;If I overwrite the Render() method to dispose the parent web after rendering, I get &amp;quot;SPException: Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&amp;quot; Apparently the second webpart still references and needs the same object (seems to be quite logical as they both get it from the SPContext), and still needs it after rendering.&lt;/p&gt;
&lt;p&gt;If I dispose the parent web in the UnLoad(), it works most of the times, but sometimes I get a message in the log that the object is freed on a different thread then when it was created. It is not on my development machine (single CPU), but I've seen it on a testing environment. But also, UnLoad() seems to be happening only after a while, so that violates the best practice of holding on to SharePoint objects only for a short time. &lt;/p&gt;
&lt;p&gt;So what should I do? Would limiting the life span of a ParentWeb be a solution? That would mean that I will have to get/dispose it for 2 to 4 times per page view per webpart. What impact will that have on performance?&lt;/p&gt;
&lt;p&gt;So, what _IS_ the best practice handling derefenced SPWebs or SPSites (e.g. through ParentWeb, Site, RootWeb and the like)?&lt;/p&gt;
&lt;p&gt;I would like to make a suggestion that the SharePoint development team changes the rules, so that all SPWebs, SPSites etc. that are opened through deferencing (e.g. SPWeb.ParentWeb, SPWeb.Site, SPSite.RootWeb SPSite.AllWebs() etc.) are property of the &amp;quot;owning&amp;quot; object, and will be disposed of by that owning object. For my example, the parent web should be disposed of when the context web (the one I get through SPContext.Current) is disposed of by the webpart page manager.&lt;/p&gt;
&lt;p&gt;Or, even better: make sure the GC can do it's work properly. The current system looks like an even bigger mess than badly implemented COM objects. Or please tell me that I am wrong! &lt;/p&gt;
&lt;p&gt;Thanks again for the insight, and I hope you can clear things up further for me!&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3135868</link><pubDate>Mon, 13 Oct 2008 15:14:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3135868</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;all SPSite/SPWeb objects retrieved through SPContext are not required to be disposed. This also includes SPSite/SPWeb objects created as reference from other SPSite/SPweb objects retrieved through SPContext.&lt;/p&gt;
&lt;p&gt;The SPContext object tracks all SPSite/SPWeb objects created from its objects and disposes them as soon as the SPContext object is disposed at the end of the request.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3140360</link><pubDate>Wed, 22 Oct 2008 16:33:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3140360</guid><dc:creator>Robert Standefer</dc:creator><description>&lt;p&gt;Stefan,&lt;/p&gt;
&lt;p&gt;I've made the change in the Registry (added the HeapSettings key and the SPRequestStackTrace DWORD) but the stack trace doesn't appear in my logs. I've checked and double-checked the Registry setting. Am I looking in the wrong place? Is there some kind of reset I need to do?&lt;/p&gt;
&lt;p&gt;I've posted about this problem on Stack Overflow: &lt;a rel="nofollow" target="_new" href="http://stackoverflow.com/questions/218613/proper-disposal-of-sharepoint-objects"&gt;http://stackoverflow.com/questions/218613/proper-disposal-of-sharepoint-objects&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3140363</link><pubDate>Wed, 22 Oct 2008 16:36:19 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3140363</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Robert,&lt;/p&gt;
&lt;p&gt;sounds as if you did not restart the process.&lt;/p&gt;
&lt;p&gt;The registry change requires a restart of the services to be catched.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3141023</link><pubDate>Thu, 23 Oct 2008 22:37:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3141023</guid><dc:creator>Jason Riley</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;I have a SharePoint Publishing site that I created in SharePoint Designer. &amp;nbsp;I'm not using any custom code to my knowledge but my default.aspx page will not load on certain systems resulting in a memory error. &amp;nbsp;Could my publishing site be suffering from memory leak issues? &amp;nbsp;I guess my question is if I didn't use any custom code to create this Publishing Site are the SPweb, SPsite and PublishingWeb objects being properly disposed?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jason&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3141311</link><pubDate>Fri, 24 Oct 2008 13:10:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3141311</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Jason,&lt;/p&gt;
&lt;p&gt;if you did not code anything and did not include any 3rd party component then everything should be properly disposed.&lt;/p&gt;
&lt;p&gt;I would suggest to open a support call with Microsoft to get this problem analyzed in more detail.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3151311</link><pubDate>Wed, 12 Nov 2008 02:08:21 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3151311</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;The question I ask myself is why not just expose SiteMapNode properties only (eg Title, Url), until the code actually asks for SPWeb specific data (through PortalWebSiteMapNode.GetProperty)&lt;/p&gt;
&lt;p&gt;I appreciate it needs to be security trimmed, but it seems wasteful to create a whole SPWeb object (with 2Mb unmanaged object) just to get lightweight info for navigation.&lt;/p&gt;
&lt;p&gt;Is there a roadmap for improving this?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Martin&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3151528</link><pubDate>Wed, 12 Nov 2008 12:37:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3151528</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;in order to fill the SiteMapNode properties you have to read them from the underlaying object. So the SPWeb object has to be created to read the URL and Title from it and fill it into the site map node object.&lt;/p&gt;
&lt;p&gt;That's what happens.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3151882</link><pubDate>Wed, 12 Nov 2008 21:57:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3151882</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;Thanks for the swift reply. (I hope this isn't a double post)&lt;/p&gt;
&lt;p&gt;Would it be wrong to call this a design flaw?&lt;/p&gt;
&lt;p&gt;We have objects like SPQuery to get efficient access to other types of SharePoint data without the overhead of the object model, what about something similar for navigation?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Martin&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3152255</link><pubDate>Thu, 13 Nov 2008 11:29:26 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3152255</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I'm not sure if you could easily implement the required functionality - e.g. enumeration of child sites with optional security trimming as provided by the site map providers - without instantiating the actual objects.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>SPDisposeCheck tool has been official announced</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3152291</link><pubDate>Thu, 13 Nov 2008 12:28:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3152291</guid><dc:creator>Stefan Goßner</dc:creator><description>&lt;p&gt;I have discussed problems with missing dispose for SPWeb and SPSite objects earlier on my blog (e.g.&lt;/p&gt;
</description></item><item><title>Disposing SPWeb and SPSite objects</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3164362</link><pubDate>Fri, 05 Dec 2008 17:36:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3164362</guid><dc:creator>Stefan Goßner</dc:creator><description>&lt;p&gt;There are several articles around discussing the dispose of SPWeb and SPSite objects, e.g.: SharePoint&lt;/p&gt;
</description></item><item><title>Linki do prezentacji o zarządzaniu obiektami</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3169326</link><pubDate>Tue, 16 Dec 2008 01:39:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3169326</guid><dc:creator>.neting in the free world</dc:creator><description>&lt;p&gt;Linki, kt&amp;#243;re posłużyły mi przy tworzeniu prezentacji, z kt&amp;#243;rych czerpałem wiedzę, nakładałem ją na to&lt;/p&gt;
</description></item><item><title>When to Dispose SharePoint objects</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3182692</link><pubDate>Thu, 15 Jan 2009 11:08:32 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3182692</guid><dc:creator>Confluence: SharePoint Development Wiki</dc:creator><description>&lt;p&gt;SPSite and SPWeb implement the IDisposable interface&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3185032</link><pubDate>Sat, 17 Jan 2009 18:16:33 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3185032</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;Hi stefan, &lt;/p&gt;
&lt;p&gt;Thanks for your effort to explain this to us. Specifically, I notice the &amp;quot;Potentially excessive number of SPRequest objects&amp;quot; (max 21 in one thread) only during the first use of a solution after an IISRESET. &lt;/p&gt;
&lt;p&gt;After this the use does not generate log entries about excessive sprequest. Is this normal?&lt;/p&gt;
&lt;p&gt;Peter.&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3185034</link><pubDate>Sat, 17 Jan 2009 18:25:15 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3185034</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;that depends on your solution and what code is executed in the requests. E.g. caching could explain this.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3188486</link><pubDate>Wed, 21 Jan 2009 18:12:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3188486</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;Stefan, thanks for the answer. &lt;/p&gt;
&lt;p&gt;1. Is it safe to conclude that as long I don't get 8l1n (..object was not disposed before the end of this thread) I can ignore the excessive SPRequest objects entries in the logs?&lt;/p&gt;
&lt;p&gt;2. Are 21 SPObjects really excessive for an 64bit environment?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3188511</link><pubDate>Wed, 21 Jan 2009 18:56:37 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3188511</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;About caching. I use&lt;/p&gt;
&lt;p&gt;SPUtility.RunWithElevatedPrivilegies() and the application Pool identity is not local admin. &lt;/p&gt;
&lt;p&gt;I read &amp;nbsp;-&amp;gt; &amp;quot;... this will simply revert the current user identity to the identity of the current application pool, and if this identity is not a farm administrator -&amp;gt;then&amp;lt;- your SPSite _will_ be cached in the SPRequestContext&amp;quot; [Understanding SharePoint SPRequest- Hristo Pavlov’s Blog].&lt;/p&gt;
&lt;p&gt;What if in an environment the identity pool is local admin. Should I then see the &amp;quot;Potentially excessive number of SPRequest objects&amp;quot; in every consequent use?&lt;/p&gt;
&lt;p&gt;Peter &lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3188518</link><pubDate>Wed, 21 Jan 2009 19:13:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3188518</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;1) that depends on how high the number is in the &amp;quot;excessive&amp;quot; message. If it in the range you expect for your application you can ignore them.&lt;/p&gt;
&lt;p&gt;2) 21 objects is actually a very small number.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3188522</link><pubDate>Wed, 21 Jan 2009 19:17:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3188522</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;RunWithElevatedPrivileges will create a new SPSite object - independent from the account.&lt;/p&gt;
&lt;p&gt;The caching that happens in some situations is only for the current http request.&lt;/p&gt;
&lt;p&gt;From SPRequest perspective there is no difference if the SPSite object is cached or not.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3224546</link><pubDate>Thu, 09 Apr 2009 18:48:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3224546</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;Even after setting SPRequestStackTrace to 1 and running iisreset, we are still *not* getting stack traces for the 8l1n messages. &lt;/p&gt;
&lt;p&gt;Do you know why this might be ?&lt;/p&gt;
&lt;p&gt;Thanks, &lt;/p&gt;
&lt;p&gt;Kim&lt;/p&gt;
&lt;p&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSetting]&lt;/p&gt;
&lt;p&gt;&amp;quot;SPRequestStackTrace&amp;quot;=&amp;quot;1&amp;quot;&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3224555</link><pubDate>Thu, 09 Apr 2009 19:07:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3224555</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Kim,&lt;/p&gt;
&lt;p&gt;the registry key above is wrong. You used &amp;quot;HeapSetting&amp;quot; where it should be &amp;quot;HeapSettings&amp;quot;. Notice the missing &amp;quot;s&amp;quot; at the end.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3224566</link><pubDate>Thu, 09 Apr 2009 19:36:48 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3224566</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;Sorry, I copied the information from a different site when I wa composing the blog comment. &amp;nbsp;But we actually did use the HeapSettings&lt;/p&gt;
&lt;p&gt;Below is what we've set. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you actually seen it generate a stack trace for the 8l1n messages ? &amp;nbsp;What's interesting is that we do get stack traces for the SPRequest warning messages. &amp;nbsp;I assume that this one setting controls the stack trace for both sets. &amp;nbsp;So why is a stack trace appearing for one set and not the other ?&lt;/p&gt;
&lt;p&gt;Also, I wonder if there's anything else we need to configure to get the stack traces displayed for the 8l1n messages. &amp;nbsp;This is a bit frustrating as it seems to me that these are the actually useful stack traces...&lt;/p&gt;
&lt;p&gt;Kim&lt;/p&gt;
&lt;p&gt;Windows Registry Editor Version 5.00&lt;/p&gt;
&lt;p&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings]&lt;/p&gt;
&lt;p&gt;&amp;quot;SPRequestStackTrace&amp;quot;=dword:00000001&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3224608</link><pubDate>Thu, 09 Apr 2009 20:50:44 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3224608</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Kim,&lt;/p&gt;
&lt;p&gt;yes I use it quite often when working on customer cases. Around 2-3 times a month.&lt;/p&gt;
&lt;p&gt;Its always working.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3224642</link><pubDate>Thu, 09 Apr 2009 22:40:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3224642</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;Thanks for your help ! &amp;nbsp;I restarted sharepoint services and the www publishing service, and I'm seeing the allocation stack traces for the 8l1n messages. :).&lt;/p&gt;
&lt;p&gt;Best, &lt;/p&gt;
&lt;p&gt;Kim.&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3225816</link><pubDate>Mon, 13 Apr 2009 17:40:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225816</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;I'm not sure if I'm reading this correctly, but it looks like I am getting stack traces for the 'object was not disposed before the end of this thread.' &amp;nbsp;Interestingly, I *am* getting stack traces for the 'object was reclaimed by the garbage collector instead of being explicitly freed.' &amp;nbsp; I thought both stack traces were controlled by the same registry value ?&lt;/p&gt;
&lt;p&gt;Am I misreading this ? &amp;nbsp;Do you have any insight into why this might be ?&lt;/p&gt;
&lt;p&gt;Thanks, &lt;/p&gt;
&lt;p&gt;Kim.&lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;04/13/2009 10:19:25.02 &amp;nbsp;: w3wp.exe (0x0CA8) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x129CWindows SharePoint Services &amp;nbsp; General &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8l1nMonitorable &lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;An SPRequest object was not disposed before the end of this thread. &amp;nbsp;To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. &amp;nbsp;This object will now be disposed. &amp;nbsp;Allocation Id: {7B27433F-4E67-491A-BA7F-B274D9048165} &amp;nbsp;To determine where this object was allocated, create a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings. &amp;nbsp;Then create a new DWORD named SPRequestStackTrace with the value 1 under this key.&lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;04/13/2009 10:19:25.02 &amp;nbsp;: w3wp.exe (0x0CA8) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x129CWindows SharePoint Services &amp;nbsp; General &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8l1nMonitorable &lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;An SPRequest object was reclaimed by the garbage collector instead of being explicitly freed. &amp;nbsp;To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. &amp;nbsp;Allocation Id: {A143F475-52DD-45BC-B897-AF4C9BEFFBC1} &amp;nbsp;This SPRequest was allocated at&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Library.SPRequest..ctor()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPWeb.InitializeSPRequest()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPWeb.EnsureSPRequest()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPWeb.get_Request()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPFieldCollection.EnsureFieldsSafeArray(Boolean bGetFullXML)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPFieldCollection.Undirty(Boolean bGetFullXML)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPFieldCollection.Undirty()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPBaseCollection.System.Collections.IEnumerable.GetEnumerator()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at GreyPkgWFApproval.Utils.getMissingFields(SPList spList, String[] listColumns)&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3225832</link><pubDate>Mon, 13 Apr 2009 18:17:57 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225832</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Kim,&lt;/p&gt;
&lt;p&gt;that is interesting. Haven't seen this.&lt;/p&gt;
&lt;p&gt;Anyway: the stack clearly shows the 3rd party control that is causing the leak.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3225910</link><pubDate>Mon, 13 Apr 2009 21:56:28 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225910</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;This is pretty weird, but it might help other people who may have run into the same issue (stack trace not appearing for the 'object was not disposed before the end of this thread').&lt;/p&gt;
&lt;p&gt;I tried configuring the related IIS application pool so that it would recycle the worker process after 1 request. &amp;nbsp;This actually caused the stack trace to start appearing for the above type messages. &amp;nbsp;Then, to double-check, I de-selected the 'Recycle worker process(number of requests)' option and noted that the stack trace no longer appeared. &amp;nbsp;Instead it presented the misleading message about setting the SPRequestStackTrace DWORD value to 1 -- misleading because it had already been set.&lt;/p&gt;
&lt;p&gt;Finally, I set the 'Recyle worker process (number of requests)' to 10 and the stack trace appeared again for the above 'end of thread' type messages.&lt;/p&gt;
&lt;p&gt;By the way, for all of the above experiments, I had the 'Recycle worker processes(in minutes)' also selected and set to 15 minutes.&lt;/p&gt;
&lt;p&gt;So I think this may be a bizarre Microsoft bug, where the 'end of thread' stack traces only appears if the number of requests item is selected.&lt;/p&gt;
&lt;p&gt;Between the two log messages below, the only change I made was to select and set the 'Recycle worker process (number of requests')&lt;/p&gt;
&lt;p&gt;to 10.&lt;/p&gt;
&lt;p&gt;Kim.&lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;04/13/2009 14:40:31.96 &amp;nbsp;: w3wp.exe (0x1428) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x1470Windows SharePoint Services &amp;nbsp; General &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8l1nMonitorable &lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;An SPRequest object was not disposed before the end of this thread. &amp;nbsp;To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. &amp;nbsp;This object will now be disposed. &amp;nbsp;Allocation Id: {A00EAB6F-6BF1-4A5D-A502-AD330B3C3373} &amp;nbsp;To determine where this object was allocated, create a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings. &amp;nbsp;Then create a new DWORD named SPRequestStackTrace with the value 1 under this key.&lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;04/13/2009 14:47:43.22 &amp;nbsp;: w3wp.exe (0x1400) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x14F0Windows SharePoint Services &amp;nbsp; General &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8l1nHigh &amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt;****************************************************************&lt;/p&gt;
&lt;p&gt;An SPRequest object was not disposed before the end of this thread. &amp;nbsp;To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. &amp;nbsp;This object will now be disposed. &amp;nbsp;Allocation Id: {0C8F72A4-C270-442F-B7A6-11BE72E7849A} &amp;nbsp;This SPRequest was allocated at&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Library.SPRequest..ctor()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPSite.GetSPRequest()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPSite.get_Request()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPSite.GetReusableAclForScope(Guid scopeId)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Publishing.AclCache.GetAclForScope(Guid scopeId)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Publishing.CachedArea..ctor(PublishingWeb area, String id, String parentId, String title, String url, String description, CachedObjectFactory factory)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Publishing.CachedArea.CreateCachedArea(PublishingWeb area, CachedObjectFactory factory, String parentId)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Publishing.CachedObjectFactory.CreateObject(PublishingWeb area, String parentUrl)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.Publishing.CachedObjectFactory.CreateObject(PublishingWeb area)&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3225915</link><pubDate>Mon, 13 Apr 2009 22:21:46 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225915</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;Just an update -- this might be useful to other people as well:&lt;/p&gt;
&lt;p&gt;Basically, it looks like the IIS application pool property 'Recycle worker process (number of requests)' is the critical property to set, and the only one that generates a stack trace for the 'object was not disposed before the end of this thread' message. &amp;nbsp;It's best to leave the other recycle options deselected, as if they trigger, they actually won't generate a stack trace. &amp;nbsp;I've verified this for the 'Recycle worker processes (in minutes)' option.&lt;/p&gt;
&lt;p&gt;I have not verified whether the Memory recycling options also generate a stack trace for the 'object was not disposed before the end of this thread' message(s).&lt;/p&gt;
&lt;p&gt;Best, &lt;/p&gt;
&lt;p&gt;Kim.&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3225919</link><pubDate>Mon, 13 Apr 2009 22:41:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3225919</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Stefan, &lt;/p&gt;
&lt;p&gt;Just an update -- this might be useful to other people as well:&lt;/p&gt;
&lt;p&gt;Basically, it looks like the IIS application pool property 'Recycle worker process (number of requests)' is the critical property to set, and the only one that generates a stack trace for the 'object was not disposed before the end of this thread' message. &amp;nbsp;It's best to leave the other recycle options deselected, as if they trigger, they actually won't generate a stack trace. &amp;nbsp;I've verified this for the 'Recycle worker processes (in minutes)' option.&lt;/p&gt;
&lt;p&gt;I have not verified whether the Memory recycling options also generate a stack trace for the 'object was not disposed before the end of this thread' message(s).&lt;/p&gt;
&lt;p&gt;Best, &lt;/p&gt;
&lt;p&gt;Kim.&lt;/p&gt;</description></item><item><title>SharePOint: Excessive SPRequests Objects</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3226475</link><pubDate>Wed, 15 Apr 2009 00:55:42 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3226475</guid><dc:creator>Dennis J. Bottjer | MVP ASP.NET </dc:creator><description>&lt;p&gt;Issue: SharePoint Sites may log “Excessive SPRequest Objects,” under normal use. When I first saw this&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3291505</link><pubDate>Wed, 04 Nov 2009 19:31:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3291505</guid><dc:creator>Cornelius J. van Dyk</dc:creator><description>&lt;p&gt;Hey Stefan,&lt;/p&gt;
&lt;p&gt;We implemented your recommended changed on our QA SharePoint WFE server and then the WFE started throwing the following error for some unknown reason:&lt;/p&gt;
&lt;p&gt;Server Error in '/' Application.&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Specified cast is not valid. &lt;/p&gt;
&lt;p&gt;Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;/p&gt;
&lt;p&gt;Exception Details: System.InvalidCastException: Specified cast is not valid.&lt;/p&gt;
&lt;p&gt;Source Error: &lt;/p&gt;
&lt;p&gt;An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Stack Trace: &lt;/p&gt;
&lt;p&gt;[InvalidCastException: Specified cast is not valid.]&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.SPRequestManager.get_SPRequestsPerThreadWarning() +588&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable) +695&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) +2626&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) +192&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.Administration.SPFarm.get_RequestNoAuth() +25&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler.get_Hash() +162&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler.get_AppDomainIdHeader() +152&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler.OverrideExecuteUrlPath() +507&lt;/p&gt;
&lt;p&gt; &amp;nbsp; System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +83&lt;/p&gt;
&lt;p&gt; &amp;nbsp; System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677954&lt;/p&gt;
&lt;p&gt; &amp;nbsp; System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +155&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 &lt;/p&gt;
&lt;p&gt;The only way to get the WFE back online was to removed the registry entries and restart the services.&lt;/p&gt;
&lt;p&gt;Researching the particular error yielded nothing except one Google cached paged that had the same problem on 9/29/09.&lt;/p&gt;
&lt;p&gt;Do you have any ideas what might have caused the server to behave like that? (I'm not expecting you to miraculously know or be able to resolve the problem, but I'm hoping you might have seen a server do that before when applying these entries)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;C&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3291625</link><pubDate>Thu, 05 Nov 2009 08:21:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3291625</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Cornelius,&lt;/p&gt;
&lt;p&gt;I have never seen this.&lt;/p&gt;
&lt;p&gt;But the error indicates that you entered the registry value with the incorrect type. Did you use DWORD or string?&lt;/p&gt;
&lt;p&gt;It should be a DWORD.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3293596</link><pubDate>Fri, 13 Nov 2009 10:20:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3293596</guid><dc:creator>Subhasis</dc:creator><description>&lt;p&gt;I have a strange error here.I have a content source. Whenever crawl runs,SQL connections goes too high. and only thing i got in the ULS logs is below&lt;/p&gt;
&lt;p&gt;Potentially excessive number of SPRequest objects (12) currently unreleased on thread 9. &amp;nbsp;Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. &amp;nbsp;Allocation Id for this object: {329BFC8D-6CB9-4C18-8048-72166ABE4E08} Stack trace of current allocation: &amp;nbsp; &amp;nbsp;at Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPWeb.InitializeSPRequest() &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPWeb.EnsureSPRequest() &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPWeb.get_Request() &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPWeb.SetMondoPr...	 &lt;/p&gt;
&lt;p&gt; 	...ocHint(Int32 hint) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.CWebChange.CheckDB() &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.CWebChange..ctor(CChange parentChange, String strID, Boolean fDeleteEvent) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.CSiteChange.GetWeb(String strID, Boolean fDeleteEvent) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.SiteDataImpl.ProcessChanges(CChange change, SPChangeCollection spChangeCollection, SPChangeToken&amp;amp; spLastChangeToken, Int64&amp;amp; lTimeLeft) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.SiteDataImpl.GetChanges(CChange change, SPChangeToken&amp;amp; spChangeToken_Start, SPChangeToken spChangeToken_End, Int64 lTimeout) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.SiteDataImpl.GetChanges(ObjectType objectType, String contentDa...	 &lt;/p&gt;
&lt;p&gt;1...tabaseId, String&amp;amp; startChangeId, String&amp;amp; endChangeId, Int32 Timeout, Boolean&amp;amp; moreChanges) &amp;nbsp; &amp;nbsp; at Microsoft.SharePoint.SoapServer.SiteData.GetChanges(ObjectType objectType, String contentDatabaseId, String&amp;amp; LastChangeId, String&amp;amp; CurrentChangeId, Int32 Timeout, Boolean&amp;amp; moreChanges) &amp;nbsp; &amp;nbsp; at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&amp;amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) &amp;nbsp; &amp;nbsp; at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) &amp;nbsp; &amp;nbsp; at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) &amp;nbsp; &amp;nbsp; at System.Web.Services...	 	Windows SharePoint Services &amp;nbsp; 	General &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	0	Medium &amp;nbsp;	....Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) &amp;nbsp; &amp;nbsp; at System.Web.Services.Protocols.WebServiceHandler.Invoke() &amp;nbsp; &amp;nbsp; at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() &amp;nbsp; &amp;nbsp; at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context) &amp;nbsp; &amp;nbsp; at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() &amp;nbsp; &amp;nbsp; at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) &amp;nbsp; &amp;nbsp; at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) &amp;nbsp; &amp;nbsp; at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) &amp;nbsp; &amp;nbsp; at System.Web.HttpRuntime.ProcessRequestInternal(HttpWo...	 &lt;/p&gt;
&lt;p&gt;...rkerRequest wr) &amp;nbsp; &amp;nbsp; at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)&lt;/p&gt;
&lt;p&gt;Looks like the same error. But it happnes with crawl ? Any pointers. we have custom webparts. But RendertoIndexer property is already set to false. So webparts are not loaded during crawl. So what might be the reason of such high number of SP Requests ?&lt;/p&gt;</description></item><item><title>re: Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007</title><link>http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx#3293599</link><pubDate>Fri, 13 Nov 2009 10:35:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3293599</guid><dc:creator>Stefan_Gossner</dc:creator><description>&lt;p&gt;Hi Subhasis,&lt;/p&gt;
&lt;p&gt;this is expected and by design. During crawl the same happens as if you would browse to the website. Except that crawl puts a pretty high load on the site. Every single instantiated SPWeb objects maintains its own SQL connection. As the crawler uses multiple threads to crawl the site it is like a load test against your site. All the navigation controls on the pages will get instantiated and will instantiate SPWeb objects.&lt;/p&gt;
&lt;p&gt;So the only way to reduce the number of SQL connections would be to reduce the number of threads the crawler is using.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item></channel></rss>