I'm running into strange behavior where my wcf wshttp service finishes processing data (I know because I log a message right before I return a list of people) but the client doesn't receive a response and sits there "hung". I increased the timeout to 2 hours and even though the service finishes retrieving data after 20 minutes, the client will hang for 2 hours before reaching the timeout limit and receiving a timeout exception. As you probably guessed, I am returning a lot of data from the service (about 50 thousand complex objects). I have the [DataContract] attribute on everything I want serialized.
Troubleshooting I've done:
In our test environment the service seems to work everytime and returns after 20 minutes.
Our production servers randomly run into the above issue. Sometimes it returns after 20 minutes, sometimes the client receives a timeout error an hour and 40 minutes after the service actually finished.
I enabled wcf tracing and the last thing it traces is the Close ClientBase statement. This is the last thing I do before returning from the method (except for the log statement right after that).
I set most the config settings to their max values to handle the large dataset being returned.
Is this a server/network issue? Any other steps I can take to track this problem down?
The service is hosted in IIS7 Windows Server 2008 R2. Using .net framework 4.5.2.