Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF connection limits

Tags:

wcf

We have a WCF net.tcp service in high traffic site. http://www.artedelcorpo.com/

It works very well for some time, then it stops and returns a timeout error. When I restart IIS, it runs again.

Why? Is there a limit on connections?

like image 851
user758977 Avatar asked Sep 06 '11 21:09

user758977


1 Answers

There is a default setting of 10 connections for the NetTcp Binding. You can increase this in the <binding> section of your config. The same is true of the timeouts - the default is 1 minute, but you can also adjust the close timeout, open timeout, receive timeout and send timeout.

<system.serviceModel>
    <bindings>
        <netTcpBinding>
            <binding name="MyNetTcpBinding" closeTimeout="00:05:00"
                     openTimeout="00:05:00" receiveTimeout="00:05:00"
                     sendTimeout="00:05:00" maxConnections="100" />
        <netTcpBinding>
    </bindings>
</system.serviceModel>

The above sample will set the timeouts to 5 minutes and the max connections to 100.

See <netTcpBinding> for more detail/information.

like image 187
Tim Avatar answered Oct 13 '22 07:10

Tim