Microsoft KB Archive/843584

= Your ASP or ASP.NET application may restart or you may lose the session object when more SMB requests exist than the Web server can process =

Article ID: 843584

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft Internet Information Services 5.0
 * Microsoft Internet Information Services 5.1
 * Microsoft Internet Information Services 6.0
 * Microsoft ASP.NET 1.1
 * Microsoft ASP.NET 1.0

-



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
You work with Microsoft ASP.NET or Microsoft Active Server Pages (ASP) that are stored on a remote file share that uses the Server Message Block (SMB) protocol. When more SMB requests exist than the Web server can process, your Web application may unexpectedly restart or you may lose the session object. When this problem occurs, you may receive the following error message in the error log:

Failed to start monitoring directory changes.

Note Remote file shares that use the SMB protocol can include Network Attached Storage (NAS) devices, System Area Networks (SAN), or UNIX-based shares.



CAUSE
This problem occurs when the number of SMB requests to the server is larger than the resources that are allocated to handle the requests. If the SMB redirector receives too many network requests, you may lose the session object, your application may restart, and you may receive an error message in the error log.

Note This problem may occur because of server load or the remote file share load. To verify that the load on the server is the problem, click Start, click Run, type perfmon, and then click OK. Then, if the value of the Redirector/Current Commands entry is more than 90 percent of the maximum load value, raise the capacity of the server.

This problem may occur when the number of SMB requests outnumber the resources to handle those requests, or it may occur when the number of SMB requests on the file share outnumber the resources to handle those requests.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



RESOLUTION
To work around this problem, increase the number of connections that you can have by resetting the registry values of the  and the   keys. The recommended values are 253, 1124, and 2048. To do this, follow these steps.

Note In this section, the  is the Web server and the   is the remote share.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Verify that the setting for the  registry value on the Web server is 50 or larger. To do this, follow these steps:

Note The  and   entries are REG_DWORD decimal entries. If they do not exist, you may create them as new REG_DWORD values. The range of values for these registry entries is between 0 and 65535. If the  and   keys do not exist, create the keys.  Click Start, click Run, type regedit, and then click OK. Locate and then click the following key in the registry:

 In the right pane, double-click the MaxCmds value. In the Value box, verify that the number is 50 or larger. If the number is not larger than 50, increase the value to one of the recommended values. Quit Registry Editor.</li></ol>

Note In a Microsoft Windows Terminal Services environment, you may have to set the  registry value to 500 or larger. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

232476 Terminal Server client connections and logon limited by MaxWorkItem and MaxMpxCt values

</li> Verify that the setting for the  registry value on the Microsoft Windows 2000-based server computer is 50 or larger. If the  and   keys do not exist, create the keys. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, click Run, type regedit, and then click OK.</li> Locate and then click the following key in the registry:

</li> In the right pane, double-click the MaxMpxCt value.</li> In the Value box, verify that the number is 50 or larger. If the number is not larger than 50, increase the value to one of the recommended values.

Note The  value determines the maximum number of active requests that the server allows for at the same time from an individual client.</li> Quit Registry Editor.</li></ol>

Note On SMB servers that are not based on Windows 2000, the  registry value has the same function as the   registry value on non-Windows 2000-based Windows operating systems.</li> Repeat steps 1 and 2 on the remote share.</li></ol>

Note If you increase these values on the x86 platform, the file server and the IIS clients will consume additional non-paged pool memory. Non-paged pool memory has an upper limit of 256 megabytes (MB). Lots of clients together with lots of connections can consume all the non-paged pool memory on the file server. Use Performance Monitor to watch this counter and to make sure that it is not approaching the limit. On the x64 platform, non-paged pool memory has an upper limit of 128 gigabytes (GB). Therefore, you can increase these values to the maximum value. For more information about the differences between non-paged pool memory on the x86 platform and on the x64 platform, click the following article number to view the article in the Microsoft Knowledge Base:

294418 Comparison of 32-bit and 64-bit memory architecture for 64-bit editions of Windows XP and Windows Server 2003

<div class="moreinformation_section">

MORE INFORMATION
Note This article does not apply to x64 computers.

For more information about SMB and your specific hardware and software configuration, contact your vendor or service provider.

For more information about the SMB Redirector and how to raise the value of the MaxMpxCt and MaxMpx keys, click the following article numbers to view the articles in the Microsoft Knowledge Base:

317249 How to troubleshoot Event ID 2021 and Event ID 2022

810886 Error message: Error 56 - The network BIOS command limit has been reached

Keywords: kbprb kbsmb KB843584

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.