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

Populating Fails with TimeOut #47

Closed
asadcr opened this issue Apr 20, 2021 · 4 comments · Fixed by #51
Closed

Populating Fails with TimeOut #47

asadcr opened this issue Apr 20, 2021 · 4 comments · Fixed by #51
Labels
Milestone

Comments

@asadcr
Copy link

asadcr commented Apr 20, 2021

Here is the log Entry

6.11.11 (X64) 2021-04-20T12:44:25.9842861+05:00 Error opening DataContext
RemoteException - SqlException - Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Source=Core .Net SqlClient Data Provider

 -System.Data.SqlClient.SqlConnection Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action]) offset: 0x50
 -System.Data.SqlClient.SqlInternalConnection Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action]) offset: 0x29
 -System.Data.SqlClient.TdsParser Void ThrowExceptionAndWarning(System.Data.SqlClient.TdsParserStateObject, Boolean, Boolean) offset: 0x157
 -System.Data.SqlClient.TdsParser Boolean TryRun(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject, Boolean ByRef) offset: 0x0
 -System.Data.SqlClient.SqlDataReader Boolean TryConsumeMetaData() offset: 0x40
 -System.Data.SqlClient.SqlDataReader System.Data.SqlClient._SqlMetaDataSet get_MetaData() offset: 0x31
 -System.Data.SqlClient.SqlCommand Void FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String) offset: 0x92
 -System.Data.SqlClient.SqlCommand System.Data.SqlClient.SqlDataReader RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean, Int32, System.Threading.Tasks.Task ByRef, Boolean, System.Data.SqlClient.SqlDataReader) offset: 0x33C
 -System.Data.SqlClient.SqlCommand System.Data.SqlClient.SqlDataReader RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.Threading.Tasks.TaskCompletionSource`1[System.Object], Int32, System.Threading.Tasks.Task ByRef, Boolean, System.String) offset: 0x79
 -System.Data.SqlClient.SqlCommand System.Data.SqlClient.SqlDataReader RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String) offset: 0x0
 -System.Data.SqlClient.SqlCommand System.Data.SqlClient.SqlDataReader ExecuteReader(System.Data.CommandBehavior) offset: 0x2A
 -System.Data.SqlClient.SqlCommand System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior) offset: 0x0
 -System.Data.Common.DbCommand System.Data.Common.DbDataReader ExecuteReader(System.Data.CommandBehavior) offset: 0x0
 -LinqToDB.Data.DbCommandProcessor.DbCommandProcessorExtensions System.Data.Common.DbDataReader ExecuteReaderExt(System.Data.IDbCommand, System.Data.CommandBehavior) offset: 0x19
 -LinqToDB.Data.DataConnection System.Data.IDataReader ExecuteReader(System.Data.IDbCommand, System.Data.CommandBehavior) offset: 0x0
 -LinqToDB.Data.DataConnection System.Data.IDataReader ExecuteReader(System.Data.CommandBehavior) offset: 0x96
 -LinqToDB.Data.CommandInfo System.Collections.Generic.IEnumerable`1[T] Query[T]() offset: 0x45
 -LinqToDB.Data.DataConnectionExtensions System.Collections.Generic.IEnumerable`1[T] Query[T](LinqToDB.Data.DataConnection, System.String) offset: 0x7
 -LinqToDB.LINQPad.LinqToDBDriver System.Nullable`1[System.DateTime] GetLastSchemaUpdate(LINQPad.Extensibility.DataContext.IConnectionInfo) offset: 0x2D


   INNER: Win32Exception - The wait operation timed out.
   
   (no stack trace)
Source=System.Private.CoreLib

 -System.Runtime.ExceptionServices.ExceptionDispatchInfo Void Throw() offset: 0x11
 -System.Runtime.CompilerServices.TaskAwaiter Void ThrowForNonSuccess(System.Threading.Tasks.Task) offset: 0x27
 -System.Runtime.CompilerServices.TaskAwaiter Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) offset: 0x28
 -System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter TResult GetResult() offset: 0xB
 -LINQPad.DataContextManager+<FetchDCInfoCore>d__31 Void MoveNext() offset: 0x30A


First Chance Data:
   -System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() offset=0x11
@asadcr
Copy link
Author

asadcr commented Apr 20, 2021

It seems that the command
select max(modify_date) from sys.objects
cannot complete. Database is super huge so even this command does not finish in due time in SQL Server.

return db.Query<DateTime?>("select max(modify_date) from sys.objects").FirstOrDefault();

@MaceWindu MaceWindu added the bug label Apr 20, 2021
@MaceWindu
Copy link
Contributor

That's strange, by default it should use infinite timeout. Have you tried tune it in connection settings?

image

@asadcr
Copy link
Author

asadcr commented Apr 20, 2021

Yes. Command Timeout is set to 0. However it seems changing the TimeOut has no effect. it fails after a fixed timeout

@MaceWindu
Copy link
Contributor

I've prepared fix for it (planned for release today)

@MaceWindu MaceWindu added this to the 3.3.2 milestone Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants