WCF MaxConcurrentSessions Exceeded

I get into a problem with my corporate application.

I am going to summarize the key elements of the system:

  • My company system has been working for several years on Windows XP and 7 (Home, Pro, Basic) machines.
  • It was written in .NET 4.0 and is based on WCF.
  • It uses the default throttling values ​​(MaxConcurrentSessions = 100 * CPU (4): enough for our workload).
  • The main service is hosted by a standalone deamon process (not IIS).
  • The main service is configured as instances of Multithraded / PerSession.
  • The protocol is reliable NET.TCP.
  • No more than 10 clients simultaneously get access to the service.

The problem is that only in Windows 7 with interruptions I get (I found that the WCF full tracing protocol) "too busy server exception" due to the exhausted MaxConcurrentSessions limit (impossible !!!).

Do you have any idea about this strange behavior?

Thank you and happy new year!

Antonio

+4
c # exception session throttling wcf
source share
2 answers

Do all of your clients correctly close / delete the connection to the service after use? It is worth checking that β€œghostly” compounds can explain this.

+1
source share

We encountered a similar problem with the self-service WCF interface, which provided a synchronous request / response web service for an asynchronous (2 one-way service call) backend request. At the beginning of our testing, we noticed that after a certain amount of time our service stopped responding to new requests. After some research, we found that whenever the backend service (beyond our control) did not send a response, we continued to wait indefinitely, and therefore we closed our client connection.

We fixed the problem by providing the configuration value "timeout", so we will respond to the client and close the connection. We used something like the following ...

Task processTask = Task.Factory.StartNew(() => Process(message)); bool isProcessSuccess = processTask.Wait(shared.ConfigReader.SyncWebServiceWaitTime); if (!isProcessSuccess) { //handle error … } 

The following link, which provides information on WCF Service performance counters, can help further determine if calls are closed as expected. http://blogs.microsoft.co.il/blogs/idof/archive/2011/08/11/wcf-scaling-check-your-counters.aspx

Hope this helps. Yours faithfully,

+1
source share

All Articles