ServiceThrottlingBehavior.MaxConcurrentCalls Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets a value that specifies the maximum number of messages actively processing across a ServiceHost.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public int MaxConcurrentCalls { get; set; }

Property Value

Type: System.Int32

The upper limit of active messages in the service. The default is 16 times the processor count.

The MaxConcurrentCalls property specifies the maximum number of messages actively processing across a ServiceHost object. Each channel can have one pending message that does not count against the value of MaxConcurrentCalls until Windows Communication Foundation (WCF) begins to process it.

You can also set the values of this attribute by using the <serviceThrottling> element in an application configuration file.


MaxConcurrentCalls should be set to less than the SQL connection pool size in queued scenarios.

The following code example shows the use of ServiceThrottlingBehavior from an application configuration file that sets the MaxConcurrentSessions, MaxConcurrentCalls, and MaxConcurrentInstances properties to 1 as an example. Real-world experience determines what the optimal settings are for any particular application.

.NET Framework
Available since 3.0
Return to top