SqlConnection leak diagnosis?

I am having a problem with a web application that exhausts all available connections in the connection pool. I seem to recall some good tools used to diagnose all active connections, but I draw a space. What are some good diagnostic options for this problem?

+3
source share
4 answers

. WinDbg network memory profiler with SOS will allow you to track who keeps links to your connection objects, with this information you should track insult methods.

+1
source

SqlDataReader ? SqlDataReader .

+2

. - , , , , /, , , .

, , , , , . , , , , ( () {})

+1

You can run sp_who to view active connections from the SQL server, but most likely you are not closing your connections as others suggested. However, if you close the connections, but immediately open them (for example, in a loop reading a text file or something like that), you can use them all, even if you think you close them (see Connection Pool ). If you post an example of your code, I think you will get a better answer.

+1
source

Source: https://habr.com/ru/post/1705434/


All Articles