Linq to SQl over WCF Timesout after several calls

Posted by Redeemed1 on Stack Overflow See other posts from Stack Overflow or by Redeemed1
Published on 2010-04-20T09:49:09Z Indexed on 2010/04/20 9:53 UTC
Read the original article Hit count: 481

Filed under:
|
|

I have a L2S Repository class which instantiates the L2S DataContext in its constructor. The repository is instantiated at run time (using Unity) in a service hosted in IIS with WCF.

When I run up the client MVC applicaton the calls to the backend WCF service work for a while and then timeout.

I suspected perhaps a database issue as I was depending on IIS garbage collection to dispose of unused DataContext instances in the IIS host but when I checked the characteristics of the problem I notice the following:

  1. The client makes the call to WCF but the WCF service does not respond.

  2. Next, the client times out

  3. Some time later (several minutes) the service actually executes the request by instantiating the repository and servicing the call.

I have checked both client and server traces logs and only the client shows WCF errors (the timeout error).

Where should I look? Is it something in WCF or is L2S possibly blocking with unfreed conenctions, resources etc.?

Many thanks

Brian

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about linq-to-sql