This might occur when you are testing scalability with a large number of client connection attempts.Disable the "Shared Memory" option within SQL Server Configuration Manager under "Client Protocols" and sort TCP/IP to 1st in the list.Increase the registry values of TcpMaxDataRetransmissions and TcpMaxConnectRetransmissions.I tried other methods suggested on the Internet that didn't work either: The same test was failing each time, but when I disabled that test, another one would fail continuously. The test suite isn't even a hard pressing performance test at all, so I had no idea what was happening. So I deployed the service and DB locally to no avail. ![]() The service and DB were both on external servers so I thought that might be the issue. I have a C# test suite that tests a service. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) : A transport-level error has occurred when sending the request to the server. This is what I had in my service error log: I had the same problem albeit it was with service requests to a SQL DB. As I recall upping TcpMaxDataRetransmissions to 6 or 7 solved our problem in the vast majority of cases. These default to 5 and 2 respectively, try upping them a little bit on the client system and duplicate the load situation.ĭon't go crazy! TCP doubles the timeout with each successive retransmission, so the timeout behavior for bad connections can go exponential on you if you increase these too much. In particular you want to look at TcpMaxDataRetransmissions and maybe TcpMaxConnectRetransmissions. Take a look at the registry settings for tuning TCP/IP on Windows. Part of the reason was the defaults for how many times TCP will retransmit data on Windows weren't appropriate for our situation. ![]() What we found was that in a heavy load situation, it was fairly easy for the remote server to time out connections at the TCP layer simply because the server was busy. ![]() However it was identical in that it involved a low-level transport error. That answer involved SMB connections, not SQL. I posted an answer on another question on another topic that might have some use here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |