WCF Service Timeouts

How do timeouts work in WCF? I know, for example, that you can configure sendTimeout and receiveTimeout to bind clients. But how do they work?

MSDN describes sendTimeout as:

The TimeSpan value that defines the time interval that is provided for submit operation to complete. This value must be greater than or equal to zero. The default value is 00:01:00.

What are send / receive operations?

+61
timeout configuration wcf wcf-binding
Oct 23 '08 at 13:43
source share
3 answers

Client side:

  • SendTimeout is used to initialize an OperationTimeout, which controls all communication to send a message (including receiving a response message in case of a response request). This timeout is also applied when sending response messages from the CallbackContract method.
  • OpenTimeout and CloseTimeout are used when opening and closing channels (in the absence of an explicit timeout value).
  • ReceiveTimeout is not used.

Server side:

  • Postpone, open and close the timeout, as on the client (for callbacks).
  • ReceiveTimeout is used by the ServiceFramework layer to initialize the session timeout.

Source by Brian McNamara on MSDN Forums .

+61
Oct 23 '08 at 16:51
source share

See "WCF Timeouts and Their Default Values" http://blogs.msdn.com/b/hongmeig/archive/2010/03/06/timeouts-in-wcf-and-their-default-values. aspx

Binding Timeouts - SendTimeout, ReceiveTimeout, OpenTimeout, and CloseTimeout. They can be easily installed either through config or code on Binding. The default value for them is 1 minute.

ServiceHost has OpenTimeout and CloseTimeout. The default value for OpenTimeout is 1 minute, and the default value for CloseTimeout is 10 seconds.

Client-side timeouts. There is an OperationTimeout which you can set by translating the channel into IContextChannel. The default for this is also 1 minute. Ttimeout on a tcp transport called ChannelInitializationTimeout, and its default value is 5 seconds.

ASPNET There is a shutdown timeout, just like the shutdown service host timeout, by default - 90 seconds. ExecutionTimeout, like our default timeout, is 110 seconds.

+9
Oct. 16 2018-11-11T00:
source share

In addition to what was on this post, there is also an operation timeout defined on the client side. See this:

http://final-proj.blogspot.com/2009/09/wcf-timeouts.html

+4
Sep 09 '09 at 20:46
source share



All Articles