开发者

Unclosed connection - Connection Pool debugging SQL Server

开发者 https://www.devze.com 2022-12-08 21:38 出处:网络
We have a suspect application leaving a connection open. Just wonderi开发者_如何学Gong on the debugging tools for this, as to whether anyone has any good tools for isolating this, commercial or otherw

We have a suspect application leaving a connection open. Just wonderi开发者_如何学Gong on the debugging tools for this, as to whether anyone has any good tools for isolating this, commercial or otherwise.

I've Googled but only seem to bring up articles that describe the problem - not the steps for a solution.

This is the best article I've seen so far. - Others welcome.

Anyone have any products that isolate the problematic code? Profilers which perform this sort of thing, or any other advice to add?


You can always check the Activity Monitor on SQL Server to see if the application is keeping the connection open.

It's under the Management node in SQL Server Management Studio. It will show you the host, application, user, number of open transactions, etc. for any applications that are connected to the database.


Which language are you using? Under Java's BoneCP connection pool (http://jolbox.com) there is support to detect exactly this by watching for when a thread terminates and printing out a stack trace of the location where the connection was opened but not closed.

You can probably implement something very similar yourself though of course it will slow things down if you intend to use this in production.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号