Note that there are some explanatory texts on larger screens.

plurals
  1. POMassively increased new TCP connections # in .NET 4.5 over 4.0?
    primarykey
    data
    text
    <p>I am currently testing my WPF/WCF client application in .NET 4.5 vs 4.0 with a view of finally getting 4.5 rolled out to all client machines. The WCF portion uses BasicHttpBinding/SOAP. </p> <p>When testing the two client versions under the same conditions (Win7 etc), we're seeing a 10x increase in "New TCP connections" to the SOAP server endpoint - 4.0 clients establish ~450 per hour whilst 4.5 clients are establishing ~6,000. Since we're connecting to a remote server, this is troublesome as establishing a new TCP connection adds a large latency to the web service call.</p> <p>When using 4.0, We previously have tuned the client <code>ServicePointManager</code> settings to maximise our TCP connection reuse and expected these settings to be applicable to 4.5.</p> <p>My application generally performs one call at a time, perhaps every 10 seconds on average - with bursts of 10 concurrent calls every few minutes.</p> <p>I've had a look at the changelogs and cannot find any reference to fixes/changes that have been made to this part of .NET. Can anyone shed some light on what might be going on here?</p> <pre><code>ServicePointManager.UseNagleAlgorithm = true; ServicePointManager.Expect100Continue = false; ServicePointManager.DefaultConnectionLimit = 50; ServicePointManager.MaxServicePointIdleTime = 10000; Binding binding = new BasicHttpBinding { SendTimeout = TimeSpan.FromSeconds(_settings.SendTimeout), ReceiveTimeout = TimeSpan.FromSeconds(_settings.SendTimeout), MaxReceivedMessageSize = 1024 * 1024 * 10, MaxBufferSize = 1024 * 1024 * 10, MaxBufferPoolSize = 1024 * 1024 * 100, Security = { Mode = BasicHttpSecurityMode.TransportCredentialOnly, Message = { ClientCredentialType = BasicHttpMessageCredentialType.UserName }, Transport = { ClientCredentialType = HttpClientCredentialType.Basic }, }, }; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload