次の方法で共有


Performance - MOSS 2007 site takes a considerable time to load.

When it comes to performance, most of the times, it is not an easy job to find what is causing performance delay. We can run into multiple directions and scratching our heads for more than one reason. But we can definitely look into some basic stuff to see if we can reach any conclusion.

I came across a scenario where a SharePoint site for e.g. https://sharepoint was taking more than 20 seconds to load and the expected load time is max 4-5 seconds considering when we have customizations on the site.

Below steps should help you to isolate if performance is farm wide or for a specific site:

Create a new site collection under problem web application with out of box team site template and default master page (URL should look like https://sharepoint/sites/site1 ).

Create a new test page under the problem site collection and with above example it should look like https://sharepoint/pages/test.aspx .

Try to browse above both URLs. If URL https://sharepoint/sites/site1 is loading fine and URL https://sharepoint/pages/test.aspx is still taking time to load then it means problem is with customizations or any component on the site which is taking time. This isolates to a level that problem is only with the specific site collection and not on the farm level.

Now in my scenario, I found that working and problem site have only one difference - https://sharepoint/pages/test.aspx was using custom master page. Here I got my first clue.

Then I enabled ASP.NET tracing for the problem test page. Add the below section to the problem web application's web.config file and save:
      <configuration>
<system.web>
<trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false"/>
</system.web>
</configuration>

I must say that ASP.NET tracing is a good technique to use when you have customizations on the site and oberving performance delays.

To view the trace logs, you need to use trace.axd right after the URL. In my case, the problem test page URL was https://sharepoint/pages/test.aspx, so to view trace for test.aspx, you need to browse the URL https://sharepoint/pages/trace.axd

This URL will show you a report, in File column search for the problem URL (in our case, it is pages/test.aspx). So you should see an entry with pages/test.aspx and on the right side View Details link.

When you click on View Details, you should see the complete stack trace of the series of events that gets fired. Make a note of time taken for the page load. Typically, the first phase would be Begin PreInit and the last phase should be End Render. Total time was approximately 21 seconds and after looking at the Control Tree, we figured out that masterpage control was the only control that was sending largest data to the page. Refer the image below:

We noticed that there are some links on custom master page. Tried browsing each and every link. All links were working fine except one. That link was loading very slowly and occasionally came up with "Diagnose connection problem" error on the page. Digged more on that link and figured out that it is configured to pull the data from internet using a proxy that was set in web.config.

Tried pinging that proxy and got Request time out. That was the root cause of the performance delay.

Replaced problem proxy with the working proxy and site came up fine in few seconds. :)

Happy troubleshooting!