This project has moved. For the latest updates, please go here.

Sessions Timeouts

Apr 27, 2010 at 5:28 PM

Hi All,

I'm doing load testing on WCF and would like to know the fundamentals of WCF sessions and their timeout criteria. I have configured the InstanceContextMode to "PerSession" and have left the MaxConcurrentSessions on default (10) and then hosted the WCF Service in IIS 7.0. The results of the load tests show that 10 WCF calls were made and then any subsequent calls failed with a timeout exception. This seems to be normal behavior.

When do those sessions timeout? I thought it may be 20 minutes (since IIS's sessions are by default set to that value), but after being inactive for over an hour, I re-run the load test and all WCF calls still fail, indicating that those initial 10 sessions are still being utilized. Only an IISRESET will allow me to free up those sessions.

Does WCF sessions have their own timeout values? Or do they depend on the protocol's session? Can session timeouts be configured on the WCF service? Also, if both WCF and the protocol have session timeouts, then which one takes preference?


Apr 28, 2010 at 7:46 AM

I am not 100% sure, but check the ReceiveTimeout property on the binding:



May 10, 2010 at 4:41 PM

Thanks, will give this a shot.


May 17, 2010 at 2:54 PM

The ReceiveTimeout property on the binding resolves the problem. Thanks!