Event ID 2020 and event ID 1000 are logged and the registry size limit is exceeded on a computer that is running Terminal Services in Application Server mode and Windows Server 2003 or Windows 2000

Article translations Article translations
Article ID: 906952 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • Your computer is running Microsoft Windows Server 2003 or Microsoft Windows 2000.
  • The computer is running Terminal Services in Application Server mode.
  • Printer redirection is enabled.
  • The SetPrinter function is set to level 2.
In this scenario, you experience the following symptoms:
  • The registry size limit is exceeded. Additionally, the following event message is logged in the System log:

    Event Type: Error
    Event Source: Srv
    Event Category: None
    Event ID: 2020
    Date: Date
    Time: Time
    User: N/A
    Computer: Server Name
    Description: The server was unable to allocate from the system paged pool because the pool was empty.

  • Users may be unable to log on to the server that has Terminal Services enabled. In this case, the following event message is logged in the System log:

    Event Type: Error
    Event Source: Userenv
    Event Category: None
    Event ID: 1000
    Date: Date
    Time: Time
    User: NT AUTHORITY\SYSTEM
    Computer: ComputerName
    Description: RegLoadKey failed. Return value Insufficient system resources exist to complete the requested service for C:\Documents and Settings\ntuser.dat.

  • The default registry hive file that is located in the %SystemRoot%\System32\Config folder may increase. For example, the size may exceed more than 5 megabytes (MB).
  • Users who are connected through Terminal Services sessions may experience slow response or the client may appear to stop responding (hang) when it runs programs on the Terminal Server computer. Additionally, users may receive error messages that are related to system memory.

CAUSE

This problem occurs because temporary registry entries that contain printer information are not deleted when a user logs off. These undeleted registry entries accumulate until the default registry hive file exceeds the registry size limit.

On a terminal server, redirected printers are installed when a user logs on. The SetPrinter function stores detailed information about the printer in the buffer. When the user logs off, the printer is uninstalled and the corresponding registry values that contain printer information are deleted.

To support backward compatibility, the naming conventions for the registry values that store printer information for the currently logged on users are different when the SetPrinter function is set to level 2. For example, when a user manually configures printer settings, the registry values that are stored under the
HKEY_USERS\.DEFAULT\Printers\DevModes2
registry subkey are similar to the following:
%ClientName%\%PrinterName% (from %ClientName%) in session SessionName
The registry value that is created by using the earlier naming convention is similar to the following:
\\%ClientName%\%PrinterName% (from %ClientName%) in session SessionName,localspl
When the SetPrinter function is set to level 2, the registry entries that contain printer information appear to be automatically created. Because the removal process only looks for and deletes registry values that are manually created, these temporary registry entries are not deleted when a user logs off.

RESOLUTION

Windows 2000

Hotfix information

Important This hotfix prevents new values from being written to the registry, but this hotfix does not delete existing registry values. Therefore, you must complete the steps that are included in the "Workaround" section before you apply this hotfix. A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
To apply this hotfix, you must have Windows 2000 Service Pack 4 (SP4) installed on the computer.
Restart requirement
You must restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
   Date         Time   Version           Size  File name
   --------------------------------------------------------
   09-Sep-2005  00:27  5.0.2195.7070  115,472  Winspool.drv
   25-Feb-2005  05:13  6.1.22.4       371,936  Updspapi.dll

Hotfix installation information

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows


To enable this hotfix, you must create the
PrinterMaskKey
registry subkey. To do this, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following registry subkey:
    HKEY_USERS\.default\printers
  3. Right-click the registry subkey that you located in step 2, point to New, click Key, type PrinterMaskKey, and then press ENTER.
  4. Exit Registry Editor.

Windows Server 2003

Service pack information

To resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
889100 How to obtain the latest service pack for Windows Server 2003

Hotfix information

Important This hotfix prevents new values from being written to the registry, but this hotfix does not delete existing registry values. Therefore, you must complete the steps that are included in the "Workaround" section before you apply this hotfix.
Prerequisites
No prerequisites are required.
Restart requirement
You must restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
File information
Windows Server 2003, 32-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Winspool.drv5.2.3790.2740150,52805-Jul-200616:30Not Applicable
Windows Server 2003, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Winspool.drv5.2.3790.2740252,92805-Jul-200617:03Not ApplicableSP1SP1QFE
Wwinspool.drv5.2.3790.2740150,52805-Jul-200617:03Not ApplicableSP1WOW
Windows Server 2003, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Winspool.drv5.2.3790.2740410,11205-Jul-200617:02Not ApplicableSP1SP1QFE
Wwinspool.drv5.2.3790.2740150,52805-Jul-200617:02Not ApplicableSP1WOW

Hotfix installation information

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows


To enable this hotfix, you must create the
PrinterMaskKey
registry subkey. To do this, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following registry subkey:
    HKEY_USERS\.default\printers
  3. Right-click the registry subkey that you located in step 2, point to New, click Key, type PrinterMaskKey, and then press ENTER.
  4. Exit Registry Editor.

WORKAROUND

To work around this problem, follow these steps:
  1. Make sure that all users have logged off the server, and then remove the server from the production environment.
  2. Restart the server.
  3. If the memory leak has not exceeded the registry size limit, go to step 4. If the memory leak has exceeded the registry size limit, follow these steps:
    1. Install a parallel installation of Windows on the same partition as the installation that does not start. For more information about how to install a parallel installation of Windows, click the following article number to view the article in the Microsoft Knowledge Base:
      266465 How to perform a parallel installation of Windows 2000 or Windows Server 2003
    2. Restart the computer by using the parallel installation of Windows that you installed in step 3a.
    3. Rename the DEFAULT registry hive from the problem installation of Windows to DEFAULT.BAK.

      The path of the hive to rename is %Systemroot%\System32\Config\DEFAULT.
    4. Load the default.bak registry hive. To do this, follow these steps:
      1. Click Start, click Run, type regedit, and then click OK.
      2. Click HKEY_LOCAL_MACHINE, click Load Hive on the File menu, and then select the registry hive file that you backed up in step 3c.
      3. Name the newly loaded registry hive. For example, name the new registry hive TEMP-DEFAULT.
    5. Locate and delete the following subkey:
      HKEY_LOCAL_MACHINE\TEMP-DEFAULT\printers\Devmodes2
      Note TEMP-DEFAULT is the name of the registry hive that you loaded in step 3d.
    6. Re-create a blank
      Devmodes2
      subkey under
      HKEY_LOCAL_MACHINE\TEMP-DEFAULT\printers
      .
    7. Click the HKEY_LOCAL_MACHINE\TEMP-DEFAULT hive, and then click Save key in the File menu.
    8. Save the hive as DEFAULT in the %Systemroot%\System32\Config folder.
    9. In Registry Editor, click Unload Hive on the File menu.
    10. Restart the computer.
  4. If the memory leak has not exceeded the registry size limit, delete and then re-create the following registry subkey:
    HKEY_USERS\.default\printers\Devmodes2
  5. Monitor the size of the default registry hive file that is located in the %Systemroot%\system32\config folder. If the size of the default registry hive file exceeds the registry size limit, repeat step 3.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft Windows Server 2003 Service Pack 2.

MORE INFORMATION

For more information about how hotfix packages are named, click the following article number to view the article in the Microsoft Knowledge Base:
816915 New file naming schema for Microsoft Windows software update packages
For more information about the standard terminology that is used to describe Microsoft software updates, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 906952 - Last Review: October 9, 2011 - Revision: 6.0
APPLIES TO
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
Keywords: 
kbautohotfix kbwinserv2003sp2fix kbhotfixserver kbtshoot kbbug kbfix kbqfe KB906952

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com