Desktop Heap Issues

Over the past year I have seen multiple servers falling prey to the desktop heap issue due to which CSS has received multiple support calls. And where do I fit into all this. Well SQL Server setup works in two phases, the second phase being service startup. When you have a large (don’t ask me what this number is because it varies based on multiple parameters) number of services running on your server, then the SQL service startup might fail due to which the setup would fail. That is when you would either curse the setup and give it another shot(s) or call CSS.

Read about what the Platforms Escalation team’s blog post about what Desktop Heap is all about:

http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx 

This is when we collect DHeapMon output to analyze the current status of the Desktop Heap. Now, since you have a large number of windows services running on your server, you either have an option of shutting down the non-essential services or follow the steps mentioned in the article below (KB126962).

WORD OF CAUTION: The default values shouldn’t be changed unless Microsoft Support has asked you to do so.

If the total desktop heap becomes the system-wide buffer size, the following event is logged:

Event Type: Warning
Event Category: None
Event ID: 244
Date: Date
Time: Time
User: N/A

Description: Failed to create a desktop due to desktop heap exhaustion.

From the system event logs, you would see the following message:

Failed to create a desktop due to desktop heap exhaustion.

Timeout (30000 milliseconds) waiting for the <SQL Server name> service to connect.
The <SQL Server name> service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
The Windows Installer service entered the stopped state.

System      07/08/2009 14:07:07 Warning            244    Win32k                   User information unavailable…    Failed to create a desktop due to desktop heap exhaustion.
System      07/08/2009 14:07:07 Error              7009   Service Control Manager  User information unavailable…    Timeout (30000 milliseconds) waiting for the <SQL Server name> service to connect.
System      07/08/2009 14:07:07 Error              7000   Service Control Manager  User information unavailable…    The SQL Server (<instance name>) service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

The above messages would be noticed in the Windows Event Logs around the same time when the SQL setup failed if you are not able to install a SQL patch due to a desktop heap exhaustion issue.

Useful Link

"Out of Memory" error message appears when you have a large number of programs running

http://support.microsoft.com/kb/126962/

184802    User32.dll or Kernel32.dll fails to initialize
http://support.microsoft.com/default.aspx?scid=kb;EN-US;184802

Advertisement