Wednesday, March 28, 2012

Killing timed out connections

I am having a problem with an application that does not kill timed out connections. This is normally not an issue, but when something causes the timed out connections to build up, it stops the frontend from working correctly. The frontend developers are trying to figure out how to change their code to check for and drop timed out connections at the application. Until then, I need a way to check for timed out connections at the database and drop them there via a job that will run every 10 minutes or so. I have to make sure that only timed out connections are dropped and not active ones. Any suggestions?

-SQLBill

Sorry, SQL Server simply does not know what that is. A time out occurs in your connection object - ODBC, OLEDB... SQL Server has no concept of a timeout, so it would not know if an application on the other side has simply given up waiting for a response. What your developers need to do within the code is to issue a reset connection when they go to grab a connection and use it. That ensures that any resources are released. They need to issue a reset anytime they issue a request, grab a connection from a pool, or return a connection to a pool.sql

No comments:

Post a Comment