Tuesday, November 5, 2013

Prevent registry size issues and "Out of Memory" errors on Windows Server 2008 Terminal Servers


Registry Key
HKEY_USERS\.DEFAULT\Printers\DevModes2

1) Delete all values
 2) Configure permissions
  • Everyone
    • Deny
      • Set Value
      • Create Subkey

If this is not configured, the OS will fill this registry key with values as users log on. Over time, the registry size will grow to the maximum of 2GB. When this happens, the OS will generate “out of memory” errors in the Event Log  and users will not be able to log on.

Note the registry files grow, but do not shrink. Even if you delete the values (which you should), it does not reclaim the registry space or have an effect on the amount of memory consumed by the registry. There is no way for us to compact the registry files (like you would a .PST in Outlook). If this problem occurs, the only way to resolve this problem is to send the files to Microsoft. Microsoft will erase the unnecessary data and compact the files. The only other option is to rebuild the server.

We learned the above via a "Severity A" case opened with Microsoft.

Applies To
Windows Server 2008
Remote Desktop Services
Terminal Services