BUG: Failure to Spawn New Thread Not Handled Correctly by SQL Server and Open Data ServicesID: Q216381
|
On computers with 2 GB or more of physical memory, where SQL Server has been configured to use 1.5 GB or more, various unpredictable behavior may be observed when SQL Server or Open Data Services (ODS) fails to spawn a new thread. Symptoms include, but are not necessarily limited to, the following errors:
After such an error, the system may stop responding, or users may report that they are unexpectedly disconnected from the server.99/01/09 18:57:53.09 server SetThreadPriority failed: 6
99/02/01 09:49:46.06 ods 99/02/01 09:49:46.74 ods 99/02/01 09:49:46.76 ods ?}")?}99/02/01 09:49:46.76 ods 99/02/01 09:49:46.79 ods ?}")?}99/02/01 09:49:46.79 ods
(This message contains a repeating pattern of the date/time, a source of 'ods', followed by random garbage characters for the message text.) 1999/02/01 09:49:48.01 ods Unable to connect. The maximum number of '500' configured user connections are already connected. System Administrator can configure to a higher value with sp_configure.
1999/02/01 09:49:48.50 kernel Not enough memory for pss allocation
1999/02/01 10:56:47.70 ods Error : 17803, Severity: 17, State: 0
1999/02/01 10:56:47.70 ods Insufficient memory available.
1999/02/01 10:56:47.70 ods OS Error : 8, Not enough storage is available to process this command.
The server is typically misconfigured such that the SQL Server process has run out of its 2 GB (or 3 GB on Windows NT Server 4.0, Enterprise Edition) of available virtual address space. At this point, all memory allocation attempts are failing, resulting in unpredictable server behavior.
When a new thread is spawned, a 1 MB allocation is performed by the operating system for the thread's stack. When the available address space has been exhausted, these allocations will fail, causing a failure to spawn a new thread. SQL Server fails to appropriately check for this error condition, causing some of the errors and unusual behavior described above.
A supported fix that corrects this problem is now available from Microsoft, but
it has not been fully regression tested and should be applied only to systems
experiencing this specific problem. If you are not severely affected by this
specific problem, Microsoft recommends that you wait for the next SQL Server service pack
that contains this fix.
To resolve this problem immediately, contact Microsoft Product Support Services
to obtain the fix. For a complete list of Microsoft Product Support Services
phone numbers and information on support costs, please go to the following
address on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.asp
Version File name
-------------------------
6.50.427 Opends60.dll
NOTE: With the hotfix installed, error 17802 is now raised within ODS when a thread cannot be created.
Q154871 Determining If You Are Eligible for No-Charge Technical Support
Evaluate the system configuration, including the number of worker threads, RA worker threads, and memory settings, and modify the configuration so that the total allocation does not exceed 2 GB.
Microsoft has confirmed this to be a problem in SQL Server version 6.5.
On Windows NT, each process has a 4 GB virtual address space, with the lower 2 GB available to the application and the upper 2 GB reserved for Windows NT. All memory allocations made by or on behalf of the application are mapped into this lower 2 GB virtual address space.
Even if a computer has more than 2 GB of memory, an application cannot directly allocate more than 2 GB, because the memory must be mapped into the available 2 GB user address space. (The exception is to use the Virtual*VLM family of APIs, which do not map the memory into the virtual address space of the process.)
On larger systems, the stack space reserved for each thread becomes significant and should be considered when analyzing the maximum amount of memory that should be allocated to SQL Server. By default, the stack size is 1 MB, but it can be altered. For additional information about modifying a thread's stack size, please see the following article in the Microsoft Knowledge Base:
Q160683 INF: How to Use Editbin to Adjust SQL Server Thread Stack SizeAs an example, consider a system with the following configuration:
Additional query words: hang hangs hung address space machine pagefile
Keywords : kbbug6.50
Version : winnt:6.5
Platform : winnt
Issue type : kbbug
Last Reviewed: July 9, 1999