Quantcast
Channel: MySQL Forums - MySQL for Visual Studio
Viewing all articles
Browse latest Browse all 417

Unable to connect to any of the specified MySQL hosts (no replies)

$
0
0
I have a c# console program which read record from one main database and then update the record to other databases. It will run for 48 hours. Firstly, when running 24 hours, The following error will happen

MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.TimeoutException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond


So I think it is caused by exceeds of maximum connection. Then I set the wait_timeout of MySQL to 60 seconds. The above exception not appeared again. But now when running for 24 hours, another error occurs, it is :

MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
at MySql.Data.MySqlClient.NativeDriver.Open()

I am wondering what is the possible cause of the above error. Please help.

Viewing all articles
Browse latest Browse all 417