INF: Error 17832 Caused by Blocking Timeout in 16-Bit Sockets

Last reviewed: July 21, 1997
Article ID: Q164516
The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 and 6.5

SUMMARY

When the 16-bit sockets Net-Library (Dbmssoc3.dll) is used on a computer running Windows 95 to connect to SQL Server, the connection may time out with an operating system error -2. On the server side, a series of "17832 Unable to read login packet" errors are logged in the SQL Server errorlog. The errors appear to occur simultaneously at first, and the frequency of the error then changes to one error per second. This lasts for a period of time approximately equal to the LoginTimeOut set by the application.

MORE INFORMATION

To avoid re-entrancy issues, the 16-bit sockets Net-Library makes socket connect calls in blocking mode. It registers its own blocking hook function, which temporarily disables Windows message dispatching, and will time out the connect call if the connect call does not return within the blocking timeout (the default is five seconds). Upon receiving error 10004 (WSAEINTR) due to the blocking timeout, DB-Library or the ODBC driver will retry the connection at incremental time intervals up to one second, until the logon timeout finally expires. However, when a socket connect call is interrupted on Windows 95, Winsock (Wsock.vxd) incorrectly returns an undocumented error -2 on all subsequent connect attempts, even though the connections are established successfully. The 16-bit Net-Library then reacts to the unrecognized error -2 by closing the socket. On the server side, SQL Server reports the Open Data Services (ODS) error 17832 for each logon attempt when it tries to read from the closed connection, through which the logon packet is expected to be sent.

On a normal TCP/IP network, the default blocking timeout (five seconds) should be long enough, so socket connections are made without ever having to invoke the blocking timeout. But if for any reason you observe that SQL Server connections using the 16-bit sockets Net-Library fail frequently with operating system error -2, and a large number of error 17832s are logged on the server, you can increase the blocking timeout value to avoid the problem. Just set the MaxSecondsToBlock value under the [SQL Server] section in the Win.ini file. For example, you can use the following entry to set the blocking timeout to 20 seconds:

   [SQL Server]
   MaxSecondsToBlock=20

 

	
	


Keywords : kbinterop kbnetwork SSrvDB_Lib SSrvNet_Lib SSrvODS
Version : 6.0 6.5
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.