Bug #40175 | Unable to connect to any of the specified MySQL hosts | ||
---|---|---|---|
Submitted: | 20 Oct 2008 13:38 | Modified: | 13 Feb 2009 16:10 |
Reporter: | Luca Leonardo Scorcia | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 5.2.3 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[20 Oct 2008 13:38]
Luca Leonardo Scorcia
[22 Oct 2008 7:57]
Luca Leonardo Scorcia
Today the server experienced the same problem, with connector version 5.1.7. I ran a SHOW FULL PROCESSLIST from a root uid, and to my surprise there were ZERO active connections - as I said, pooling is enabled so I expected at least a handful of connections open. Even in the rare occasion of one of the requests working, its DB connection was immediately closed at the end of the web page processing. So I'm thinking that maybe not all of these get marked as closed and returned to the connection pool? After running an iisreset /restart (which forces the ASP.net pipeline to reload), the connector started 10 pooled connections as usual. Is there anything else that I should test to help you diagnosing the problem?
[24 Oct 2008 11:45]
Luca Leonardo Scorcia
This is what SHOW FULL PROCESSLIST shows. The first 5 connections come from a Tomcat server running Openfire, they work great during the outage. The sixth connection is used to run SHOW FULL PROCESSLIST using Sqlyog. The remaining others are from ASP.NET requests that fail to authenticate. Id User Host DB Command Time State Info 1 openfire localhost:1032 openfire Sleep 8 NULL 2 openfire localhost:1048 openfire Sleep 8 NULL 3 openfire localhost:1049 openfire Sleep 8 NULL 4 openfire localhost:1050 openfire Sleep 8 NULL 5 openfire localhost:1051 openfire Sleep 8 NULL 499880 root localhost:4555 NULL Query 0 NULL show full processlist 502212 unauthenticated user localhost:2242 NULL Connect NULL Reading from net NULL 502213 unauthenticated user localhost:2319 NULL Connect NULL Reading from net NULL 502214 unauthenticated user localhost:2411 NULL Connect NULL Reading from net NULL As usual, running iisreset /restart fixes the issue for a few days by reestablishing the pooled connections.
[30 Oct 2008 18:48]
Joao Silva
I´m also getting those errors after upgrading to version 5.2.3: Error: Unable to connect to any of the specified MySQL hosts. Details: System.Exception: Exception of type 'System.Exception' was thrown. at MySql.Data.MySqlClient.NativeDriver.Open() Source: MySql.Data Details: at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlPool.CheckoutConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at and also Error: Too many connections Source: MySql.Data Details: at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlConnection.Open() at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at ... I can´t give any details about the server´s log because my application is hosted in a third party server and i don´t have access to this information.
[20 Nov 2008 17:57]
Andreas Falck
We seem to have the same problem with connector with version 5.2.3, see error below. SQL: select name from dummytable where column1 = @1 and column2 = @2 Exception: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown. at MySql.Data.MySqlClient.NativeDriver.Open() --- End of inner exception stack trace --- at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlConnection.Open() at nu.mrorange.storage.DataHandler.GetMySQLConnection(String connectionString) at nu.mrorange.storage.DataHandler.GetDataSet(String sql, Object[] arguments, String dataSetName, String tableName, String connectionString) Problem appeared when doing a upgrade from connector version 5.0.7 to version 5.2.3. We have several mysql servers and web sites using the connector but just one of the web sites shows this error. There are several web sites connecting to the same MySQL server as the web server showing the error but only the one web server shows this error. The web server showing the problem is dedicated. We have servers with higher load not showing the same problem. It seems that this error first occurs when we run our nightly MySQL backup (ie very high load), but initially the problem is not very severe. After the backup has finished the server is still responsive. The problem gradually becomes more and more intense and around 12 (lunch next day) the server can hardly connect to MySQL at all until we do an IIS reset. We've changed the timeout in the connection string (was 5000ms due to some antique bug) to 150ms. Same problem. We changed to the 5.2.5 connector today, hoping it will resolve the issue. We also disabled some extensions in IIS. As of now we're looking into IIS/IIS extensions, since we only have the problem on one web server. Out of curiosity, do any of you guys also have extensions on your IIS? If so, what extensions?
[13 Feb 2009 16:10]
Tonci Grgin
I am sorry but none produced test case I can actually use to verify this... For me, 5.2.3, aside for known problems, works as expected and I've never seen anything like this. My best guess is that some firewall or something is blocking connection or that server settings changed thus disabling connection authentication. Should someone come up with test case for this, I'll be monitoring.
[24 Jun 2009 12:01]
Yogesh Chaudhari
I am getting below error with MySQL Connector 5.2.5. Is anybody have any suggestion to resolve this. Thanks for the help in advance. Event Type: Warning Event Source: ASP.NET 2.0.50727.0 Event Category: Web Event Event ID: 1309 Date: 6/24/2009 Time: 6:39:04 AM User: N/A Computer: 229537-WEB1 Description: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 6/24/2009 6:39:04 AM Event time (UTC): 6/24/2009 11:39:04 AM Event ID: 22bc68faec624cfaa01248d77ea4f142 Event sequence: 81 Event occurrence: 6 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT-3-128903163027256421 Trust level: Full Application Virtual Path: / Application Path: d:\inetpub\wwwroot\ Machine name: 229537-WEB1 Process information: Process ID: 3104 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: Exception Exception message: Exception of type 'System.Exception' was thrown. Request information: Request URL: http://www.rxoffice.us/CaseSearchSS.aspx Request path: /CaseSearchSS.aspx User host address: 61.12.21.162 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 6 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at MySql.Data.MySqlClient.NativeDriver.Open() Custom event details: For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.