Unclosed connection - Connection Pool debugging SQL Server

谁说我不能喝 提交于 2019-12-05 16:42:48

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!