LINQ To SQL - Poor Sql Performance

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

The client experiences severe slowdowns almost every day and I'm not sure what to do.

The quick fix is ​​to restart the mssql service and seem to do the job, but this is not a solution.

Today I used the SQL Profiling and Tuning Wizard but didn't get any suggestions :(

I am really lost.

Any ideas?

Thank! John

+2


source to share


1 answer


It looks like you are draining the connection pool. How many users does your application have? Make sure you remove all DbConnections once you're done with them, don't open them for too long.

Usually Linq2Sql Datatacontext will take care of this for you (open / close), except that you are passing an already open connection. However, you also need to make sure you also have the datacontext so that it can disconnect the connection.



on ConnectionPooling

+1


source







All Articles