Hi i got a web application(asp.net) where we just started getting “System.InvalidOperationException: Timeout expired.” when trying to get a new sql connection.
So my guess some where in the code a connection is created but never disposed, but how would i go about to find where this happens? sadly most of the database communication does not use a datalayer it works directly with the sql data types…
Is there any thing i could enable in the web.config to trace what connections are open for longer then x seconds and where they where opened?
Ok i found a way to track them down by using
EXEC SP_WHO2
DBCC INPUTBUFFER(SPID)
SP_WHO2 gives you information about the connections and by using DBCC INPUTBUFFER you can find out what command they ran last time.