none
ReceiveTimeout in net.tcp / tcpTransport : what does it really mean ? RRS feed

  • Question

  • HI, I think there is a big confusion regarding the meaning of ReceiveTimeout (i'm basically interested in the net.tcp binding and in the tcptransport binding element).

    50% of people thinks ReceiveTimeout is a server side configuration that cotrols the maximum amount of time a call takes to execute (from start receiveing from data to ending sending data back to client), that is the net amount of time that took to the server to get data/execute call/return data.

    50% states that is the amount of time after which the server close the connection when the this connection has been idle (no data from the client).

    and by the way what is the meaning of the connectionPoolSettings idleTimeout and leaseTimeout n the tcptransport element ?

    thank you

    Thursday, July 11, 2013 8:44 AM

Answers

All replies

  • http://stackoverflow.com/questions/2275303/wcf-net-tcp-service-throwing-obscure-errors
    Monday, July 15, 2013 4:53 AM
  • Hi,

    I think I will agree with that :50% states that is the amount of time after which the server close the connection when the this connection has been idle (no data from the client).

    Please try to refer to the article about receive timeout:

    http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.binding.receivetimeout.aspx with the following:

    Gets or sets the interval of time that a connection can remain inactive, during which no application messages are received, before it is dropped.

    For the connectionPoolSettings idleTimeout, it means get or set the maximum time the connection can be idle before being disconnected.

    For more information, please try to refer to:

    #idleTimeout
    http://msdn.microsoft.com/en-us/library/system.servicemodel.configuration.tcpconnectionpoolsettingselement.idletimeout(v=vs.85).aspx .

    For the connectionPoolSettings leaseTimeout, it means get or set the time span after which an active connection is closed.

    For more information, please try to refer to:

    #leaseTimeout
    http://msdn.microsoft.com/en-us/library/system.servicemodel.configuration.tcpconnectionpoolsettingselement.leasetimeout(v=vs.85).aspx.

    Hope it can help you.

    Best Regards.


    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, July 15, 2013 5:32 AM
    Moderator
  • I did some tests, it actually means "is the amount of time after which the server close the connection when the this connection has been idle (no data from the client)." .. however (and i never realized it before) :) it also IMPLY "maximum amount of time a call takes to execute " .. I'm still quite puzzled however about "the meaning of the connectionPoolSettings idleTimeout and leaseTimeout n the tcptransport element"
    Monday, July 15, 2013 3:10 PM
  • I'm still quite puzzled however about "the meaning of the connectionPoolSettings idleTimeout and leaseTimeout n the tcptransport element"

    Hi,

    Please try to refer to the following:

    IdleTimeout:

    A positive TimeSpan that specifies the maximum time the connection can be idle before being disconnected. The default is 00:02:00.

    LeaseTimeout:

    A TimeSpan that specifies the time after which an active connection is closed. The default is 00:05:00.
    A connection is closed after it has been returned to the connection cache and not during active transmission. The connection cache used by the TCP transport creates new connections as required for each endpoint, up to the cache limit that is set by maxOutboundConnectionsPerEndpoint.

    Hope it can help you.

    Best Regards.


    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.






    Thursday, July 18, 2013 5:58 AM
    Moderator
  • ok, but then, are the connectionPoolSettings are related to client side only ? and what is the actual effect of the connectionPoolSettings idleTimeout  ? does it mean that after 2 minutes not using the channel wcf closes it at the client side ? and how this setting is related to the sendtimeout that u can set at the binding level ?

    Thursday, July 18, 2013 7:22 AM
  • Hi,

    Yes, you are right and you can set it as blow:

    <configuration>
      <system.serviceModel>
        <bindings>
          <customBinding>
            <binding name = "bindingA">
              <tcpTransport>
                <connectionPoolSettings groupName="connectionPoolA" idleTimeout"TimeSpan"
            leaseTimeout="TimeSpan"
        maxOutboundConnectionsPerEndpopint=”Integer”/>
              </tcpTransport>
            </binding>
          </customBinding>
        </bindings>
      </binding>
    

    Hope it can help you.

    Best Regards.



    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.






    Thursday, July 18, 2013 8:10 AM
    Moderator