title: wcf app slowing down, corrected by recycling IIS app pool, what can i monitor to see what is going wrong
body: <p>WCF app is built in .net 4.5, running on windows server 2012 R2 datacentre. IIS 8. Client is a click once WPF app.</p>
  <p>the app has been running for years but has started to increasingly get bogged down requiring an app pool recycle to correct once or twice a day. I am unable to find any indicator of what exactly is going wrong. RAM is peaking at 75% mostly staying around 50% , cpu is running at 10 to 20%. Nothing really changes there when I recycle the pool.</p>
  <p>My main clue is that the app uses TCP and when i switch my local debug session to HTTP it runs quickly again, in TCP mode it is slow. I know HTTP is layered on top of TCP so I wonder if it has to do with handshaking or something.</p>
  <p>TCP binding looks like this</p>
  <pre><code>   &lt;binding name=&quot;TCPSecured&quot; receiveTimeout=&quot;00:05:00&quot; sendTimeout=&quot;00:05:00&quot; maxBufferPoolSize=&quot;2147483647&quot; maxBufferSize=&quot;2147483647&quot; maxReceivedMessageSize=&quot;2147483647&quot;&gt;
        &lt;readerQuotas maxDepth=&quot;2147483647&quot; maxStringContentLength=&quot;2147483647&quot; maxArrayLength=&quot;2147483647&quot; maxBytesPerRead=&quot;2147483647&quot; maxNameTableCharCount=&quot;2147483647&quot; /&gt;
      &lt;/binding&gt;
  </code></pre>
  <p>HTTP</p>
  <pre><code>&lt;binding name=&quot;HTTPBindingConfig&quot; receiveTimeout=&quot;00:05:00&quot; sendTimeout=&quot;00:05:00&quot; maxBufferPoolSize=&quot;2147483647&quot; maxBufferSize=&quot;2147483647&quot; maxReceivedMessageSize=&quot;2147483647&quot;&gt;
    &lt;security mode=&quot;TransportCredentialOnly&quot;&gt;
      &lt;transport clientCredentialType=&quot;Windows&quot; /&gt;
    &lt;/security&gt;
    &lt;readerQuotas maxDepth=&quot;2147483647&quot; maxStringContentLength=&quot;2147483647&quot; maxArrayLength=&quot;2147483647&quot; maxBytesPerRead=&quot;2147483647&quot; maxNameTableCharCount=&quot;2147483647&quot; /&gt;
  &lt;/binding&gt;
  </code></pre>
  <p>using resource monitor looking at TCP connections I see dozens that have a high latency, over 200. No idea what that means or if it is new.</p>
  <p>using Performance monitor i have tried tracing many selections from ASP.Net applications, TYCPv4 and TCP v6, plus dozens of others, they all show low to no activity.</p>
  <p>I am over my head with this stuff and would appreciate any insights people can provide.</p>