title: Service becomes unresponsive with many sockets in CLOSE_WAIT state
body: <p>I have a WCF service with a NetTcpBinding running with about 100 clients. The clients regulary poll information from the server and after a while the service does not respond anymore.</p>
  
  <p>Looking at netstat, I can see many connections that are in the CLOSE_WAIT state.</p>
  
  <p>This is my binding:</p>
  
  <pre><code>&lt;netTcpBinding&gt;
    &lt;binding  name="default" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxConnections="10000"&gt;
      &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
    &lt;/binding&gt;
  &lt;/netTcpBinding&gt;
  </code></pre>
  
  <p>I have also tried to change the values of <strong>closeTimeout</strong> from the default of 00:01:00 to <strong>00:00:10</strong>, but with no effect.</p>
  
  <p>The machine is a Windows Server 2008 R2 64bit.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I have added a <code>ServiceThrottlingBehavior</code> now, but the result is still the same.</p>
  
  <pre><code>new ServiceThrottlingBehavior
  {
   MaxConcurrentCalls = 1000,
   MaxConcurrentInstances = 1000,
   MaxConcurrentSessions = 1000
  };
  </code></pre>
  
  <p><strong>Update2</strong></p>
  
  <p>I have set the SessionMode to NotAllowed and changed the binding to streamed. </p>
  
  <p>Any ideas what I could do to improve performance or to figure out the problem?</p>