引发类型为“System.Web.HttpUnhandledException”的异常。
MESSAGE: System.Data.SqlClient.SqlException: 事务(进程 ID 137)与另一个进程被死锁在 锁 | 通信缓冲区 资源上,并且已被选作死锁牺牲品。请重新运行该事务。 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在 System.Data.SqlClient.SqlDataReader.HasMoreRows() 在 System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) 在 System.Data.SqlClient.SqlDataReader.Read() 在 _99Ask.DAL.AskDal.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.BLL.AskBLL.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.Web.api.jjIndexApi.Page_Load(Object sender, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
System.Web.HttpUnhandledException: 引发类型为“System.Web.HttpUnhandledException”的异常。 ---> System.Data.SqlClient.SqlException: 事务(进程 ID 137)与另一个进程被死锁在 锁 | 通信缓冲区 资源上,并且已被选作死锁牺牲品。请重新运行该事务。 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在 System.Data.SqlClient.SqlDataReader.HasMoreRows() 在 System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) 在 System.Data.SqlClient.SqlDataReader.Read() 在 _99Ask.DAL.AskDal.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.BLL.AskBLL.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.Web.api.jjIndexApi.Page_Load(Object sender, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- 内部异常堆栈跟踪的结尾 --- 在 System.Web.UI.Page.HandleError(Exception e) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 在 System.Web.UI.Page.ProcessRequest(HttpContext context) 在 ASP.api_jjindexapi_aspx.ProcessRequest(HttpContext context) 位置 c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\239f9684\ccba47e1\App_Web_9qwfno5a.3.cs:行号 0 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
System.Data.SqlClient.SqlException: 事务(进程 ID 137)与另一个进程被死锁在 锁 | 通信缓冲区 资源上,并且已被选作死锁牺牲品。请重新运行该事务。 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在 System.Data.SqlClient.SqlDataReader.HasMoreRows() 在 System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) 在 System.Data.SqlClient.SqlDataReader.Read() 在 _99Ask.DAL.AskDal.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.BLL.AskBLL.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.Web.api.jjIndexApi.Page_Load(Object sender, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
System.Data.SqlClient.SqlException: 事务(进程 ID 137)与另一个进程被死锁在 锁 | 通信缓冲区 资源上,并且已被选作死锁牺牲品。请重新运行该事务。 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 在 System.Data.SqlClient.SqlDataReader.HasMoreRows() 在 System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) 在 System.Data.SqlClient.SqlDataReader.Read() 在 _99Ask.DAL.AskDal.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.BLL.AskBLL.GetAll(Int32 CurrentPage, Int32 PageSize, Int32& RecordCount, String Filter, String Sort, String Fields, String Tables) 在 _99Ask.Web.api.jjIndexApi.Page_Load(Object sender, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
System.Web 

解决方案 »

  1.   

    dbcc   traceon   看看详细信息
    检查相关SQL语句
      

  2.   

    System.Data.SqlClient.SqlException   SQL引发的问题
    重启数据库吧
      

  3.   

    多线程,某一操作锁住大量数据(如千万条数据的更新),再进行其他操作就会引发此问题
    如果update等操作的where语句中包含非主键的字段,速度也会很慢,导致锁住很久重点检查程序中频繁修改数据库的部分,用时太长了
      

  4.   

    http://blog.csdn.net/zwkandy/archive/2010/02/02/5281581.aspx
      

  5.   

    重启数据库
    System.Data.SqlClient.SqlException SQL引发的问题