Friday, October 5, 2007

Sharepoint server is too busy

There are so many reasons for this issues, lets go over all the possible reasons and fixes.

Reason 1: Not enough CPU speed.
Fix: Add more CPUs to the existing one and upgrade the speed to at least 4 Ghz.

Reason 2:
Make sure that the server is NOTrunning in the debug mode. Usually dev and QA servers are enabled with debug mode for interactive trouble shooting. All production servers are supposed to run in the 'non-debug' mode. If you are running in the debug mode, all the intermediate variables and values are cached for the debugging purpose. If you have a single variable for a code block, never think that it is gonna be a single variable on the server. A copy of the variable gets created each time a user access the code. FIX:
Disabling the debug mode for all the applicationsGo to the machine.config located at the location:C:\Microsoft.NET\Framework\%VersionNumber%\CONFIG\Your compilation mode should look like this:
<compilation debug="false"/>

Disabling the debug mode for only the sharepoint C:\Inetpub\wwwroot\wss\VirtualDirectories\80 and open the web.config(This path is for the default 80 port. If your application is running on other ports do this for all the other ports)Your compilation mode should look like this:
<compilation batch="false" debug="false">

Reason 3: Sharepoint master page or any custom page accessing asp code. Eg, IFrame rendering .asp file. This problem occurs if you have sp1 on 2003 server and do not have sp2.
Microsoft included this hot fix in the sp2.

Fix: Microsoft has hot fix to correct this problem.

Reason 4: Full Crawl tries to authenticate the users.

On the application server,

  1. This is for the general sharepoint server slow.
    start - > Run -> regedit -> HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\web server extensions\12\WSS
    right click on the WSS -> permissions -> Add user/group -> Everyone -> Read access
  2. This is for the Full Crawl/Incremental crawl causing server slow
    start - > Run -> regedit -> HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\web server extensions\12\Search
    right click on the Search -> permissions -> Add user/group -> Everyone -> Read access
Reason 5:
Network Traffic increase.


If your website keeps growing and growing, eventually you will hit the error 500-13, that your server is too busy to handle the requests. What do you do?

First, check your main settings in IIS. Make sure you look in the PERFORMANCE tab. Set your site to more than 100,000 hits/day which is probably true if you are running into this error. Remember that hits includes every file you send out - including graphics - and is much larger than your page view count.

On that same page, be sure to turn off bandwidth throttling and process throttling.

Next, on your main entry in your IIS manager, right click to get properties. Go into Server Extensions - Settings. Depending on your use of include files and images, you may want to increase the cache sizes there.

To monitor the issue, open the performance monitor in your control panel. Right click on the lower right area to add a new item to monitor. You should add in -

ASP - requests queued
ASP - requests executing
ASP - script engines cached
Processor - % processor time
Memory - available bytes

I highly recommend using XCompress which is an ASP compressor, helping to ensure that you use as little bandwidth as possible in sending your ASP files out to end users.

If you want to take your life into your own hands, you can also try setting the cache settings manually. You need to launch a CMD prompt first. Head into inetpub\adminscripts. Then run commands:

adsutil set w3svc/1/AspQueueTimeout 30
adsutil set w3svc/1/ServerListenBackLog 500
adsutil set w3svc/1/MaxEndPointConnections 500

Those will help reduce your timeout from its unlimited initial state, and set higher limits on the backlog and max connections values. Be sure to backup before trying this!

In addition, you can go back into the IIS manager and right click for the properties. Go into Home Directory then Configuration. You get a special tab in here for Process Options that is not available on a single-website basis. Set the cache values up high enough based on the performance monitor entries.

Reason 6:
Script errors on the pages running under the server. To fix this issue, look for all the script errors by the 'err' object to diagnose. Also look whether they are leaving any un allocated objects in the stack.

No comments:

Post a Comment