Re: Timeout of connection.GetSchema
Posted by: Qunshu Zhang
Date: March 11, 2014 05:32PM

I find when I didn't use any connection timeout, the default ConnectionTimeout of my connection is 15 seconds and the connection can be established. However, when I add Connect Timeout=60 or even 600, the connection cannot be established after trying about 20 seconds.

Is this a bug on the MySQL side? I have to extend the timeout for some scenarios that the server may be slow.

Here is the error message:

{"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 xxxxxxxxxxxxx:3306"}


{"Unable to connect to any of the specified MySQL hosts."}


System.Net.Sockets.SocketError.TimedOut


at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStreamFromHost(String pipeName, String hostName, UInt32 timeout)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout)
at MySql.Data.MySqlClient.NativeDriver.Open()


at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()



Edited 1 time(s). Last edit at 03/11/2014 05:39PM by Qunshu Zhang.

Options: ReplyQuote


Subject
Written By
Posted
February 19, 2014 02:06AM
Re: Timeout of connection.GetSchema
March 11, 2014 05:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.