Very long delay when using SSH
Posted: Thu 18 Jun 2009 21:09
Hello,
When using SSH and trying to connect with an incorrect MySQL password, there is a 10 second delay before the "Access Denied" exception is thrown. If I do not use SSH, it is instant. Note that the SSH credentials are correct - it is only the MySQL password that is incorrect.
Our user authentication methods are all based on the user entering his credentials and the app then attempting to connect to MySQL using these credentials to verify if they are correct (=an Authentication Failure exception means he entered incorrect credentials). To have the app freeze up for 10 seconds every time credentials are mistyped is confusing and frustrating to the users.
Version: 5.0.22.
Exception that gets thrown too slowly with SSH:
InnerException: Devart.Data.MySql.MySqlException
Message="Access denied for user 'joe'@'10.1.1.202' (using password: YES)"
Source="Devart.Data.MySql"
ErrorCode=-2147467259
Code=1045
SqlState="28000"
StackTrace:
at Devart.Data.MySql.af.n()
at Devart.Data.MySql.af.c()
at Devart.Data.MySql.s.d(String A_0)
at Devart.Data.MySql.s.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, String A_5, Int32 A_6, SshOptions A_7, SslOptions A_8, ProxyOptions A_9, HttpOptions A_10)
at Devart.Data.MySql.MySqlInternalConnection.Connect(String userId, String password, String host, String database, Int32 port, Int32 connectionTimeout, MySqlProtocol protocol, Boolean compress, Boolean clientInteractive)
at Devart.Data.MySql.MySqlInternalConnection..ctor(o connectionOptions)
at Devart.Data.MySql.ao.a(p A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, p A_1)
at Devart.Common.DbConnectionPoolGroup.c(DbConnectionPool A_0)
at Devart.Common.DbConnectionPool.a()
at Devart.Common.DbConnectionPool.GetObject()
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.MySql.MySqlConnection.Open()
at Samys.DataAccessLayer.DbConnection.ExecuteScalar(IDbCommand command) in G:\devel\dotNet\Samys\DataAccessLayer\DbConnection.cs:line 85
InnerException:
Please look into this.
Thanks,
Lars
When using SSH and trying to connect with an incorrect MySQL password, there is a 10 second delay before the "Access Denied" exception is thrown. If I do not use SSH, it is instant. Note that the SSH credentials are correct - it is only the MySQL password that is incorrect.
Our user authentication methods are all based on the user entering his credentials and the app then attempting to connect to MySQL using these credentials to verify if they are correct (=an Authentication Failure exception means he entered incorrect credentials). To have the app freeze up for 10 seconds every time credentials are mistyped is confusing and frustrating to the users.
Version: 5.0.22.
Exception that gets thrown too slowly with SSH:
InnerException: Devart.Data.MySql.MySqlException
Message="Access denied for user 'joe'@'10.1.1.202' (using password: YES)"
Source="Devart.Data.MySql"
ErrorCode=-2147467259
Code=1045
SqlState="28000"
StackTrace:
at Devart.Data.MySql.af.n()
at Devart.Data.MySql.af.c()
at Devart.Data.MySql.s.d(String A_0)
at Devart.Data.MySql.s.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, String A_5, Int32 A_6, SshOptions A_7, SslOptions A_8, ProxyOptions A_9, HttpOptions A_10)
at Devart.Data.MySql.MySqlInternalConnection.Connect(String userId, String password, String host, String database, Int32 port, Int32 connectionTimeout, MySqlProtocol protocol, Boolean compress, Boolean clientInteractive)
at Devart.Data.MySql.MySqlInternalConnection..ctor(o connectionOptions)
at Devart.Data.MySql.ao.a(p A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, p A_1)
at Devart.Common.DbConnectionPoolGroup.c(DbConnectionPool A_0)
at Devart.Common.DbConnectionPool.a()
at Devart.Common.DbConnectionPool.GetObject()
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.MySql.MySqlConnection.Open()
at Samys.DataAccessLayer.DbConnection.ExecuteScalar(IDbCommand command) in G:\devel\dotNet\Samys\DataAccessLayer\DbConnection.cs:line 85
InnerException:
Please look into this.
Thanks,
Lars