Monitor of Connection Pool

Monitor of Connection Pool

Postby joannelai » Thu 05 May 2005 09:33

I am writing a Windows Form application in which it would select or modify data from the database using a single connection. I enabled the pooling option and and set the max pool size to 10.

In order to avoid orphaned connections and overflows, I would like to write code to monitor the number of connections in pool of a specificed user. However, I have no idea what to do 'coz the .NET CLR Data (Performance Monitor) doesn't work for MySQL.

Any help is appreciated.

Best Rgds,
Joanne
joannelai
 
Posts: 5
Joined: Tue 26 Apr 2005 02:40

Postby Serious » Thu 05 May 2005 10:09

Connection pool searches for broken connections without assistance, so you don't need to do it manually.
Moreover, it is strange that you try to detect pool overflov in case that your application uses single connection, this check seems to be redundant in your case.
Serious
 

Postby joannelai » Thu 05 May 2005 14:02

What I mean "single connection" is a static connection used by the whole application. I tried to to use the said connection while it is executing a query, but the application freezes until the first query is being finished. I am confused with how the connection pool works. How can the pool improve the performance of application in dealing with differnt queries simultaneously?

Best Rgds,
Joanne
joannelai
 
Posts: 5
Joined: Tue 26 Apr 2005 02:40

Postby Serious » Thu 05 May 2005 14:17

Use separate connection for each query.
Serious
 

Postby Guest » Fri 06 May 2005 00:38

Then how the connection pool works under this situation?
Guest
 

Postby Serious » Fri 06 May 2005 07:22

Under your situation (static connection used by the whole application) connection pooling works only if you often close and open the connection.

You can find additional information about connection pooling here (note that MySQLDirect .NET uses the same connection poooling concept as the .NET Framework Data Provider for Oracle).
Serious
 


Return to dotConnect for MySQL