mcguireland on Fri, 16 Sep 2016 18:43:32
I'm totally lost on an issue a client is experiencing with running an application that utilizes SQL Server.
After they updated their workstations to .NET 4.5.2, any computer with this update that runs a program (that uses SQL as a DB) opens up around 60+ TCP connections to SQL Server 1433. It also complete devestates the Network I/O, resulting in
crazy activity spikes. Because of this, it halts the application entirely (since the network on the SQL Server is being thrashed) and locks it's use for everyone else.
The tricky part, is I've uninstalled .NET 4.5.2, updated to 4.6.x, used the removal/clean tool, wiped out the registry, replaced ODBC dll and drivers, and performed a handful of other tests. Nothing has changed (yes I promise, I've tested on many VMs) outside of just installing .NET 4.5.2. I noticed a potential regression with this release, but it doesn't look tied to opening a million TCP connections to 1433 and storming the Network I/O (Regression: SqlClient can send sequence numbers in the .NET Framework 4.5.2).
- Application uses a SQL DB for mostly read queries (very few write).
- Application is loaded with binaries from a UNC share to the workstation (old school, I know... its Clarion...).
- No changes were made to the application.
- All SQL Servers tested are affected (2008, 2012, 2014, 2016, Express, Standard, etc).
- Doesn't matter what Server OS they reside on.
- No changes were made to the SQL Server.
(EXAMPLE Photo being added once account is verified....)
Original post found here: http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/massive-spike-in-tcp-connections-to-sql-1433-after/d56b4423-9958-4f25-b7f0-82a5870aa057
In the example given, 192.168.0.68 is the workstation (naos is the hostname, Windows 7 Pro x64) and 192.168.0.29 is the Server (2012 R2 with SQL 2012 Std). Look at that I/O and all those open ports!
For computers without this .NET update, opening the application and cruising around in the menus only open 1 TCP, with about 50,000 in total active send/receive data.
When I install .NET 4.5.2 on multiple workstations and run the application from them, everything you see here is multiplied by each unit that connects. It's like it has a semi-permanent change to the Windows 7 OS, as I can't undo what it has done to these workstations! Any ideas? I'll answer any questions and give further troubleshooting notes as requested.
Please note, the only variable that has changed in this is .NET 4.5.2 being installed to the workstations only.
Zhanglong Wu on Mon, 19 Sep 2016 02:03:57
Windows 10 includes a new high-scalability networking algorithm that makes better use of machine resources by reusing local ports for outbound TCP connections. The .NET Framework 4.6 supports the new algorithm, enabling .NET apps to take advantage of the new behavior. In previous versions of Windows, there was an artificial concurrent connection limit (typically 16,384, the default size of the dynamic port range), which could limit the scalability of a service by causing port exhaustion when under load.
In the .NET Framework 4.6, two new APIs have been added to enable port reuse, which effectively removes the 64K limit on concurrent connections:
The SocketOptionName.ReuseUnicastPort enumeration value.
The ServicePointManager.ReusePort property.
For more information, please refer to (Please check "What's new in .NET 2015 -- Networking):