Connection pooling doesn't seem to work. (It doesn't work when using SqlDataSource control)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
jordan
Posts: 7
Joined: Tue 28 Mar 2006 08:05

Connection pooling doesn't seem to work. (It doesn't work when using SqlDataSource control)

Post by jordan » Wed 29 Mar 2006 14:46

Hi,

I am working on my first project with the CoreLab MySQLDirect.NET provider, and I just noticed that the connection pooling feature doesn't seem to be working. Do I have to specify something to make it work?

After only a few clicks on my this new site, the mysql process list looks like this:
ID Gebruiker Host Database Commando Tijd Status SQL-query
stop proces 739 vtu 172.17.100.17:4510 vtu Sleep 640 --- ---
stop proces 773 vtu 172.17.100.17:4619 vtu Sleep 12 --- ---
stop proces 774 vtu 172.17.100.17:4620 vtu Sleep 2 --- ---
stop proces 775 vtu 172.17.100.17:4622 vtu Sleep 13 --- ---
stop proces 776 vtu 172.17.100.17:4624 vtu Sleep 12 --- ---
stop proces 777 vtu 172.17.100.17:4626 vtu Sleep 12 --- ---
stop proces 778 vtu 172.17.100.17:4628 vtu Sleep 10 --- ---
stop proces 779 vtu 172.17.100.17:4629 vtu Sleep 10 --- ---
stop proces 780 vtu 172.17.100.17:4631 vtu Sleep 3 --- ---
stop proces 781 vtu 172.17.100.17:4634 vtu Sleep 8 --- ---
stop proces 782 vtu 172.17.100.17:4636 vtu Sleep 7 --- ---
stop proces 783 vtu 172.17.100.17:4638 vtu Sleep 5 --- ---
stop proces 784 vtu 172.17.100.17:4640 vtu Sleep 4 --- ---


I have to note that I am using the provider only using the ASP.NET 2.0 SqlDataSource control. So I don't make the connections via the MySqlConnection class myself, because the SqlDataSource makes the connections automatically for me. Could this be the problem ?

Any feedback on this would be great.

Thanks in advance,
Jordan.
Last edited by jordan on Thu 30 Mar 2006 09:42, edited 2 times in total.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 30 Mar 2006 07:37

You can configure connection pooling feature through ConnectingString property of SqlDataSource component. For more information read Microsoft Visual Studio Documentation

jordan
Posts: 7
Joined: Tue 28 Mar 2006 08:05

Post by jordan » Thu 30 Mar 2006 07:43

I have been testing more today, and I found out that if I make multiple connections (and execute a couple queries on them) on the same page by using the CoreLab.MySql.MySqlConnection class the connection pooling works fine. However if I use the ASP.NET SqlDataSource control to make the connections, although using the CoreLab.MySql data provider, the connection pooling does not work!! After clicking a bit through my website, I noticed there were about 16 connections open!

Could someone of the CoreLab team please confirm this for me, and wil you fix this ?

jordan
Posts: 7
Joined: Tue 28 Mar 2006 08:05

CoreLab MySqlDirect.NET connection pooling is not AJAX enabled!

Post by jordan » Thu 30 Mar 2006 08:55

After again more of testing, i finally found the real problem!
The problem is not directly being caused by the SqlDataSource control. The problem is that I am using the SqlDataSource control in combination with a GridView control, and the gridview is AJAX (i.e. XmlHttpRequest) driven. I have used the ASP.NET "Atlas" project to make it AJAX based. The problem is caused by the CoreLab MySqlDirect .NET driver not being able to pool connections for XmlHttpRequests :( .

I hope CoreLab wil make the connection pooling AJAX enabled, because I need it my projects.


Jordan.

jordan
Posts: 7
Joined: Tue 28 Mar 2006 08:05

Post by jordan » Thu 30 Mar 2006 09:41

After more, more and more of testing I have to come back to a previous conclusion: the connection pooling feature does not work AT ALL when using the SqlDataSource control in ASP.NET pages. Not just in AJAX enabled pages but also in normal regular ASP.NET pages.

I think this might be caused by the generic way the SqlDataSource control opens and closes connections. The pooling feature might have been implemented differently in the MySqlDirect .NET provider than in other .NET data providers.

I hope CoreLab can now find the problem and fix it :D.

(PS: I will do no more testing on this subject :wink:)

Thanks in advance,
Jordan.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 30 Mar 2006 12:44

We do not experience this problem here. Furthemore, the behaviour you describe doesn't relate to connection pooling feature as such.
So, you can send your example by email. Or we could send our working sample to you.

Post Reply