ASP.NET – Non-closed connection detected by SQL

I inherited a very large project in ASP.net, SQL 2005, and found some places where the SQL connection was not closed – it’s terrible. Didn’t pass every line of code? Is there a way to detect whether the connection has not been closed? Performance counter? As a follow-up-how does SQL recycle unclosed connections. I am using non-pooled connection strings.
> Sql does not They will be recycled. They are open until the administrator or-force closed from the client.
>Which is garbace to collect connection objects.

Maybe a memory analyzer is your best Choice-try to find out the source of the (lost and non-discarded) connection.

It looks really bad to me-because of all the asp.net applications I have written, only in One point in the code handles the connection. It seems that someone is spreading the whole place here.

A hint might be: look at the SQL from those stale connections. You should be able to retrieve the last sql statement, which might be Give you a hint of their origin.

I inherited a very large project in ASP.net, SQL 2005, and found some places where the SQL connection was not closed. – This is terrible. Without passing every line of code, is there a way to detect if the connection is not closed? Performance counter? As a follow-up-how does SQL recycle unclosed connections. I am using non-pooled connection strings.

> Sql will not recycle them. They are open until the administrator Or – force close from the client.
>Which is garbace to collect connection objects.

Maybe a memory analyzer is your best choice – try to find out (lost and non-discard) The source of the connection.

It looks really bad to me-because in all the asp.net applications I have written, the connection is only handled at one point in the code. It seems someone is here Spread the whole place.

One hint might be: look at the SQL from those stale connections. You should be able to retrieve the last SQL statements, which might give you a hint of their origin.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2091 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.