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

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
 
A

Anthony Jones

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.
 
S

Steven Cheng

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.




--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top