'[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host
I am getting the following error in application log
[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host."
I am using Microsoft SQL Server 2014 and for datasource I am using ODBC Driver 17 for SQL Server. All connection checks seems to be working fine but the DB connection is getting closed intermittently. Any ideas or suggestions are appreciated.
Solution 1:[1]
I just ran into this issue myself and hopefully can shed some light. Driver Version: ODBC Driver 17 for SQL Server. 2017.174.02.01
Checking in the SQL Server logs, I found an error similar to this:
Log entry: Error: 17832, Severity: 20, State: 11.
The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: x.x.x.x]
I then found this doc on the MSDocs site which matched the 17832 event ID.
It describes that the MaxTokenSize setting on the SQL Server itself might be too small for this particular login token. You can set the MaxTokenSize to something greater to test and if that fixes it you will want to find out the actual token size and set it to only that big.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | pants |
