Bug #30714 Getting connection timeout while using pooled connection
Submitted: 30 Aug 2007 1:45 Modified: 17 Oct 2007 9:50
Reporter: Dao-hui Chen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.0.8.1 OS:Windows
Assigned to: CPU Architecture:Any

[30 Aug 2007 1:45] Dao-hui Chen
Description:
I've encountered a bug while using Connector/NET with pooled connection. After program started for a period of time, Connector/NET will throw a exception while creating a connection:

2007-08-30 00:06:40,218 [32] FATAL IVRSystem.Logger - Occurred:error connecting: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()

On the server, it shows all connection is in sleeping state (about 20 connections).

I specified pool size in connection string with max pool size=32, min pool size=16. Using the default settings(max=100,min=0) will have the same result. But if I turned off pooled connection, everything works fine. The db server is always avaliable, so I think this is not related with Bug#29409.

I've tried 5.0.6 and 5.0.8.1, and both versions has the same result.

How to repeat:
Use pooled connection, try to connect mysql db for a period of time
[30 Aug 2007 2:22] Dao-hui Chen
My fault. If I close connection after completed query each time, everything goes fine.
[30 Aug 2007 7:31] Tonci Grgin
Hi Dao-hui and thanks for your report. You can also increase connection lifetime in connection string. Can we close this now?
[30 Sep 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".