0

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:

  1. In our test environment the service seems to work everytime and returns after 20 minutes.

  2. 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.

  3. 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).

  4. 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.

goku_da_master
  • 4,257
  • 1
  • 41
  • 43
  • I would reduce the number of records in the response to the point it consistently works to see if it is a network problem. Start with a return of 1000 records to see if it timesout. 1000 is just a random number, but i hope you get the point – snit80 Sep 01 '16 at 23:37
  • I forgot to mention I tried that one already and yes, it works with less data every time. Something to do with large data or long running requests... – goku_da_master Sep 28 '16 at 19:58
  • I think I found the cause. Seems to be our load balancer. Not sure if it has a response size limitation somewhere or what, but I got around this issue by not using the load balancer. Wish I could find the solution to the load balancer... no luck yet. – goku_da_master Dec 07 '16 at 19:42

1 Answers1

0

It looks like the load balancer was the issue. We had to increase the response timeout (and maybe the response size) on the load balancer. Not sure where these settings are on the lb because our network admin made the change.

goku_da_master
  • 4,257
  • 1
  • 41
  • 43