Set*_*ker 6 errors query-timeout
我看到 Pricincipel SQL 服务器 (2008 R2) 超时
我看到的确切错误是:
超时已过。操作完成前超时时间已过或服务器未响应。尝试连接到Principle 服务器时发生此故障。
System.Data.SqlClient.SqlException (0x80131904):超时已过期。操作完成前超时时间已过或服务器未响应。尝试连接到 Principle 服务器时发生此故障。---> System.ComponentModel.Win32Exception (0x80004005): 等待操作在 XXXX 超时
我想了解的是这是一个标准的超时,即。数据库无法在允许的时间内返回所需的结果?或者“ Principle Server ”的措辞是否意味着另一个问题?
我无法找到有关此特定错误的太多信息,并且需要知道它是否是性能问题,调整索引和 proc 将有助于解决,还是我需要查看其他问题。
我目前正在调查具有相同关键字措辞的相同超时异常的发生:
尝试连接到 Principle 服务器时发生此故障。
环境是带有镜像的 SQL Server 2012,因此我怀疑问题与长时间运行的查询没有直接关系,而是与应用程序和 SQL 服务器之间或 SQL 服务器本身之间的临时网络/同步问题有关。堆栈跟踪:
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occured while attempting to connect to the Principle server. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicUpdate(TrackedObject item)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.Update(TrackedObject item)
at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
...
Run Code Online (Sandbox Code Playgroud)
更新:显然,每当命令针对镜像/故障转移伙伴环境超时时,此措辞就会包含在异常消息中。它确实反映了超过超时的命令,并且与尝试连接失败无关。您可以通过运行简单的 WAITFOR DELAY '00:00:31' 命令来验证这一点,该命令超出了默认的 30 秒 SqlCommand 超时,并触发相同的异常消息。
我已打开Connect 错误,要求 Microsoft 更正消息中的误导性措辞。
| 归档时间: |
|
| 查看次数: |
8609 次 |
| 最近记录: |