views:

155

answers:

1

Hey all,

I have a WPF at a customer site that makes calls to a remote SQL 2005 server using Linq To Sql.

Almost everyday the customer experiences aweful slow downs, and I am not sure what to do.

The quick fix is to restart the mssql service and that seems to do the job, but that is not a solution.

Tonight I used the SQL profiler and tuning wizard, but got no suggestions :(

I'm really lost.

Any ideas?

Thanks! Jon

+1  A: 

Sounds like you're draining your connection pool. How many users has your appliaction? Make sure you dispose of all DbConnection as soon as you're done with them, don't open them for too long.

Normally Linq2Sql Datatacontext will take care of that for you (open/close), except you pass in an already open connection. However you must make sure to dispose the datacontext too, so it can in turn dispose of the connection.

link on ConnectionPooling

Johannes Rudolph