Page 1 of 1

Connection pool multi-threaded?

Posted: Mon 07 Mar 2005 20:17
by gwerner
Using MySQLDirect in an ASP.Net application. Specifying connection string with pooling=true, and using MySQL 4.1.10-nt via TCP/IP.

It looks like connection pooling is working just fine for all communications on the same thread (ie the same page load), but each new thread will not reuse the connection pool. They all seem to be loading new connections.

By the way, is there any way to make MySQL login faster? The server we're testing on is running at 2% CPU, but it still takes 2 seconds or so to login using MySQLDirect. The servers are on the same segment.

Posted: Wed 09 Mar 2005 12:59
by Serious
Connection pool serves all threads within the current App Domain.
Pay attention that connection is taken from connection pool only if there is a connection closed earlier.
Possibly, you open new connections having not closed other connections before. In this case (when connection pool is empty) new connections to server is created.

As to login performance. We have tested this functionlality and got the results that differ much from yours (0.08..0.7 sec). Maybe the problem is in the configuration of your MySQL Server.

Posted: Thu 10 Mar 2005 18:01
by gwerner
Definately could be a problem with my configuration, as it's very odd indeed. I'll do some Google searching to see why the login is taking so long.

I wonder if having it on an alternate port changes things.... Hmmmmm.....

Posted: Thu 10 Mar 2005 18:35
by gwerner
Turns out I had reverse DNS enabled in MySQL. Amazing how much difference it made.