Closed
Description
After updating to 0.40.0 my application stopped working entirely. It freezes when trying to reset the connection retrieved from the pool.
I am connecting to a AuroraDb instance.
Turning off connection pooling or turning off connection reset in the connection string both fixes the issue ( but is of course not desirable ).
Platform: Windows 10 x64
Runtime: Issue is present in both .net 4.6.2 and .net core 2.0.x
The minimal code to reproduce the issue:
MySqlConnector.Logging.MySqlConnectorLogManager.Provider = new MySqlConnector.Logging.ConsoleLoggerProvider(MySqlConnector.Logging.MySqlConnectorLogLevel.Trace);
var connection = new MySqlConnection(...);
connection.State.Dump();
connection.Open();
connection.State.Dump();
connection.Close();
connection.State.Dump();
connection.Open();
connection.State.Dump();
connection.Close();
connection.State.Dump();
Output for 0.40.1:
Closed
[INFO] ConnectionPool Pool1 creating new connection pool for ConnectionString: ...
[DEBUG] ConnectionPool Pool1 reaping connection pool
[DEBUG] ConnectionPool Pool1 recovered no sessions
[DEBUG] ConnectionPool Pool1 waiting for an available session
[DEBUG] ServerSession Session1.1 created new session
[INFO] ConnectionPool Pool1 no pooled session available; created new Session1.1
[INFO] ServerSession Session1.1 connecting to IpAddress ...
[DEBUG] ServerSession Session1.1 connected to IpAddress ... with local Port 65499
[DEBUG] ServerSession Session1.1 server sent AuthPluginName=mysql_native_password
[INFO] ServerSession Session1.1 made connection; ServerVersion=5.7.12; ConnectionId=101532; Compression=False; Attributes=True; DeprecateEof=True; Ssl=True
[INFO] ServerSession Session1.1 initializing TLS connection
[INFO] ServerSession Session1.1 connected TLS with Protocol Tls12
[DEBUG] ServerSession Session1.1 creating connection attributes
[DEBUG] ConnectionPool Pool1 returning new Session1.1 to caller; LeasedSessionsCount=1
Open
[DEBUG] ServerSession Session1.1 returning to Pool1
[DEBUG] ConnectionPool Pool1 receiving Session1.1 back
Closed
[DEBUG] ConnectionPool Pool1 waiting for an available session
[DEBUG] ConnectionPool Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession Session1.1 ServerVersion=5.7.12 supports reset connection; sending reset connection request
< At this point it sits forever and outputs the following messages every minute >
[DEBUG] ConnectionPool Pool1 reaping connection pool
[DEBUG] ConnectionPool Pool1 recovered no sessions
Output for 0.39.0:
Closed
[INFO] ConnectionPool Pool1 creating new connection pool for ConnectionString: ...
[DEBUG] ConnectionPool Pool1 reaping connection pool
[DEBUG] ConnectionPool Pool1 recovered no sessions
[DEBUG] ConnectionPool Pool1 waiting for an available session
[DEBUG] ServerSession Session1.1 created new session
[INFO] ConnectionPool Pool1 no pooled session available; created new Session1.1
[INFO] ServerSession Session1.1 connecting to IpAddress ...
[DEBUG] ServerSession Session1.1 connected to IpAddress ... with local Port 65469
[DEBUG] ServerSession Session1.1 server sent AuthPluginName=mysql_native_password
[INFO] ServerSession Session1.1 made connection; ServerVersion=5.7.12; ConnectionId=101523; Compression=False; Attributes=True; DeprecateEof=True; Ssl=True
[INFO] ServerSession Session1.1 initializing TLS connection
[INFO] ServerSession Session1.1 connected TLS with Protocol Tls12
[DEBUG] ServerSession Session1.1 creating connection attributes
[DEBUG] ConnectionPool Pool1 returning new Session1.1 to caller; LeasedSessionsCount=1
Open
[DEBUG] ServerSession Session1.1 returning to Pool1
[DEBUG] ConnectionPool Pool1 receiving Session1.1 back
Closed
[DEBUG] ConnectionPool Pool1 waiting for an available session
[DEBUG] ConnectionPool Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession Session1.1 ServerVersion=5.7.12 supports reset connection; sending reset connection request
[DEBUG] ConnectionPool Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
Open
[DEBUG] ServerSession Session1.1 returning to Pool1
[DEBUG] ConnectionPool Pool1 receiving Session1.1 back
Closed