Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. #324

Closed
panjiswt opened this issue Dec 14, 2017 · 2 comments
Closed

Comments

@panjiswt
Copy link

  • SQL Operations Studio Version: sqlops 0.23.6 (8a3011756318a2ded1e6e84332230a2b2bf9c544, 2017-11-05T22:46:14.815Z)
  • OS Version: Linux x64 4.8.0-54-generic

Steps to Reproduce:

System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=128; handshake=267; [Login] initialization=4; authentication=25; [Post-Login] complete=14115; ---> System.ComponentModel.Win32Exception (0x80004005): Unknown error 258
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.<>c__DisplayClass22_0.b__0(Task1 _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass28_0.<b__0>d.MoveNext() in C:\J\jobs\sqltoolsservice_master_win\workspace\src\Microsoft.SqlTools.ServiceLayer\Connection\ReliableConnection\ReliableSqlConnection.cs:line 298
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.d__46.MoveNext() in C:\J\jobs\sqltoolsservice_master_win\workspace\src\Microsoft.SqlTools.ServiceLayer\Connection\ConnectionService.cs:line 542
ClientConnectionId:dbfc1573-ada2-43f1-bd49-ded8ec967736
Error Number:-2,State:0,Class:11

@kevcunnane
Copy link
Contributor

I've seen this type of connection failure in 2 cases:

  • You've just booted up a docker instance and SQL Server is still initializing. Try connecting again after waiting 30seconds
  • I think this might be the case when connecting to SQL Server 2008 R2 and where SP3 or higher isn't installed. There's a mandatory security update in SP3, and the .Net Core driver won't connect to versions without this fix.

Either way, this would be a connectivity issue with the server. In the next release, we've moved the large stacktrace out of the connection dialog so it's clearer that it's a connection problem. I'm going to close this with the recommendations above since any solution would be on the server / setup side.

@panjiswt
Copy link
Author

when will the next version come out ?.
please let me know if it's out.
Thank you very much.

@adsbot adsbot bot locked and limited conversation to collaborators Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants