How to use the VS debugger to check the connection pool size?

  • Thread starter Thread starter Wei Lu
  • Start date Start date
W

Wei Lu

Hi all,

I have changed my connection code to avoid the connection leak. So the next
step is to verify it works.

Could anyone tell me how to use the VS debugger to check the connection pool
size?

Wei Lu
 
Wei Lu said:
Hi all,

I have changed my connection code to avoid the connection leak. So the
next step is to verify it works.

Could anyone tell me how to use the VS debugger to check the connection
pool size?

What are you connecting to? Its probably easier to monitor the DB you are
connecting to to see how many connections are open.
 
Hi Wei,

As for the db connection, are you using "using" block or "try ...finally"
to dispose the AseConnection?

If so, I think the best approach to verify your connection cleanup behavior
is performing some stress test. For your ASP.NET web application ,you can
use some webstress tools(or maually build a simple client program) to
request some aspx page which will perform data access operation.

After stressing it for a while, you can use debugger to attach your
application so as to check the status of the connection pool. According to
the information from your previous thread. The "AseConnectionPool" class is
the type you need to check. And the following two fields will help you
determine whether the connection pool is under healthy status:

** AseConnectionPool.Available

** AseConnectionPool.Size

The "Available" property indicate how many existing connections pooled are
available for new comming request( to connecct a certain database). If you
find that the number is zero(and there is no much current running threads
accessing db), there must be something wrong with the connection cleanup.

If you have any questions on this, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.




--------------------
 
Back
Top