Event ID 2017 and 2021 – Source Srv & Lanman Errors in Windows

If you have a file server with shared resources you may have run into an issue at one time or another when you were unable to connect to the mapped drives or shared resources.

In most cases you can just reboot the system and the problem is fixed, but what happens when the problem continues to reoccur? For most small businesses and even some home users this is not an option and the problem needs to be fixed.

What might be happening is the network configuration of Windows is not optimized for constant sharing of resources between multiple users.

To determine if Windows is limiting resources to other users on the network you can check the “Event Log” for errors indicating a misconfigured file server.

How to check for a misconfigured file server:

  1. To access the event log, “Right Click” on Computer (“My Computer” on Windows XP) and select “Manage” from the menu.
  2. Once the Management window is open click on “Event Viewer” (Then click on “Windows Logs” on Windows 7) and then “System”.
  3. In the system log check for any errors that are indicated with a red “X” or yellow exclamation mark. In this case we are be focusing on any errors with a red X.

The specific errors we are looking for are indicated by an Event ID 2017 and 2021 and are associated with the “Source Srv” and “Lanman”.

If you see these errors occurring in the log file it is an indication that Windows is not optimally configured for shared resources between multiple users on the network.

Windows Server makes it easy to set these options, but on standard versions of Windows it requires a couple changes in the registry to enable the optimal configuration settings.

To make these changes let’s open the registry editor.

Optimize Windows XP  amp; Windows 7 for file sharing:

  • Click on the “Start” menu and in the “Run” (“Search” on Windows 7) line type “Regedit” and hit Enter.

Once the registry editor is open navigate to the following location:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
  • The default value of the LargeSystemCache key is “0” (zero). Highlight “LargeSystemCache” and right click it. From the menu select “Modify”.
  • In the new window change the value data from “0” to “1” (one) and click OK.

Next, locate the following key in the registry:

  • HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size
  • By default the “Size” value will be set to “0” or “1”. Follow the procedure outlined above to modify the value and change it to “3”.
  • Once you have updated these values close the Registry Editor and reboot the system for the new settings to take effect.

The changes we’ve made to the registry should resolve the Event ID 2017 and 2021 errors and Source Srv/Lanman errors in the Windows Event Log. This will ensure that shared files and folders remain accessible to network users without the need to reboot the system. This should also keep mapped network drives from disappearing as well as optimize overall network performance ofthe file server.