在较低的环境中超时复制 [英] Time out replicate in lower environment

查看:64
本文介绍了在较低的环境中超时复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个预定的工作,每天都在预定的时间运行。它开始突然抛出一周以来的错误。我更改了应用程序,以便在邮件中向我发送堆栈跟踪,以便我可以对其进行调试。下面是堆栈跟踪。



Hi All,

I have one scheduled job which is running every day at a scheduled time. It started suddenly throwing the time out error since a week. I changed the application to send a stack trace to me in mail so that I can debug it. Below is the stack trace.

===Stack Trace===
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   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)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   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.ExecuteReader()
   at ABC.Program.Run_Report() in XXX.exe :line 8122

===Error Message===
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

===Error Source===
.Net SqlClient Data Provider





我是无法在UAT服务器中复制该问题。有人可以帮助我理解这个堆栈跟踪,以便我可以复制它。



I am unable to replicate the issue in UAT server . Can some one please help me in understanding this stack trace so that I can replicate it.

推荐答案

某些可能性,

1. SQL查询花费太长时间

2.死锁



首次使用sql logger。

查找具体的逐个查询,尝试在sql中运行并检查执行所需的时间,

尝试使用nolock函数编写查询,这将解决您的死锁问题。
Certain possibilities,
1. SQL query taking too long
2. Dead lock

First use sql logger.
Find specific one by one query, try to run in sql and check how much time it is taking to execute,
Try to write your query with nolock function, which will resolve your deadlock problem.


这篇关于在较低的环境中超时复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆