Singleton WCF service gotcha: allowing more than 10 connections

By default, an instance of a WCF service can only have 10 connections at a time. If your service is a singleton then there is obviously only one instance, which means that only 10 clients can connect to your service at a time. All subsequent connection attempts will result in timeouts if one of the 10 spots is not freed up. You can easily change this from the default by adding a serviceThrottling entry to your behavior definition in the app.config/web.config file. Here’s an example that cranks the max up to 50:

<serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="50" maxConcurrentInstances="50" />

One Comment

  1. seragam says:

    Unquestionably consider that which you explained. Your popular justification appeared to be on the internet the simplest factor to be informed of. I say to you, I absolutely get irked although folks believe about worries that they plainly do not know about. You managed to hit the nail on the best and defined out the complete thing not having having aspect-results , men and women can get a signal. Will most likely be back to get much more. Many thanks.

Leave a Reply