Your WCF service may stop processing any incoming WCF requests


1. Suppose we have a WCF service which is using session-full binding like Net.tcp.  We are using the default setting of timeout of  net.tcp bindng . For example:

a) OpenTimeout -> 1 minute
b) CloseTimeout -> 1 minute

c) SendTimeOut-> 1 minute
d) ReceiveTimeout -> 10 minute.

More details about net.tcp binding timeout setting, you can refer to below article:

Making Sense of Transport Quotas



2. If the WCF request is quite time-consuming which takes more than 10 minutes, which is longer than receiveTimeout.



3. At the same time, before the previous WCF requests are processed completely, the subsequent WCF requests keep coming again and again.


In the end, you may find that the  WCF service will stop processing any incoming WCF request any more.



4. Actually you can reproduce this issue easily with below specific condition:


  a) Use net.tcp binding.
  b) To make this issue reproduced quickly, you can configure the timeout & service throttling  less, for example:

1) OpenTimeout -> 10 seconds
2) CloseTimeout -> 10 seconds
3) SendTimeOut-> 10 seconds
4) ReceiveTimeout -> 60 seconds.
5) maxconcurrentcalls & maxconcurrentsessions & maxconcurrentinstance  of service throttling -> 1

  c)  Design a WCF method like sleep(120 seconds)  to simulate time-consuming WCF request.
  d)  Design a WCF client which will keep consuming this WCF service in 10 seconds interval.

Root Cause:

Service throttling is not released properly while receiveTimeout due to WCF framework fault, which makes the service throttling reaches its limit finally.  Since the service throttling has reached its’ limit, any incoming WCF request will be refused.


1.       You can increase  receiveTimeout value to make sure that the WCF request can be processed completely within the period of receiveTimeout.

2.       Or you can use HTTP-based binding like basic-http binding instead of Net.Tcp binding.



Winston He from APGC DSI Team.



Comments (2)

  1. kk says:


    I have created a WCf service and hosted that in windows service using nettcp binding. I need to create a scheduler to process very big files(300-500MB), the functionality is written in WCF service. I created a windows service as a scheduler. since the file is too big the processing is taking more than 15 minutes for a file.WCF is timing out before it actual finishes the processing. It times out exactly in 10 minutes. I have increased the timeout to 20 minutes at both server and client side, still it is failing.

    Please help

  2. Winston from APGC DSI Team says:


    you can adjust all timeout-related setting longer, like 60 minutes. BTW, the exception details is very impormtant because we need to understand timeout about what? operatin timeout, or open time, or any other, and you can optimize the setting pointedly

Skip to main content