服务器超时错误

时间:2012-12-13 15:00:17

标签: asp.net sql sql-server timeoutexception

我在通过ASP.NET站点执行计算过程到SQL Server时遇到问题。我知道,没有太多细节,但希望有人在这里可以提供帮助。该过程在某些情况下有效,有些则不然。这是计算炸弹时的错误信息....

'/'应用程序中的服务器错误。

超时已过期。操作完成之前经过的超时时间或服务器没有响应。 描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.Data.SqlClient.SqlException:超时已过期。操作完成之前经过的超时时间或服务器没有响应。

来源错误:

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

堆栈追踪:

[SqlException(0x80131904):超时已过期。操作完成之前经过的超时时间或服务器没有响应。]    System.Data.SqlClient.SqlConnection.OnError(SqlException exception,Boolean breakConnection)+1948826    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,Boolean breakConnection)+4844747    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)+194    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj)+2392    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,RunBehavior runBehavior,String resetOptionsString)+204    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,Boolean async)+954    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method,DbAsyncResult result)+162    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result,String methodName,Boolean sendToPipe)+175    System.Data.SqlClient.SqlCommand.ExecuteNonQuery()+137    d:\ CC.NET \ AROTest_web \ ARO_Web \ App_Code \ Database.cs中的Database.ExportFas143CostData(Int32 PermitNameID,Int32 FiscalYear,Int32 FiscalMonth,Int32 CashFlowYear,Decimal WeightedCost):1777    AroCalculations.CalculateReclamation(String ReclamationDataID,String PermitNameID)在d:\ CC.NET \ AROTest_web \ ARO_Web \ AroCalculations.aspx.cs:390    AroCalculations.CalculateSelected_Click(Object sender,EventArgs e)在d:\ CC.NET \ AROTest_web \ ARO_Web \ AroCalculations.aspx.cs:359    System.Web.UI.WebControls.LinkBut​​ton.OnClick(EventArgs e)+111    System.Web.UI.WebControls.LinkBut​​ton.RaisePostBackEvent(String eventArgument)+79    System.Web.UI.WebControls.LinkBut​​ton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)+10    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,String eventArgument)+13    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)+175    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)+1565


版本信息:Microsoft .NET Framework版本:2.0.50727.3053; ASP.NET版本:2.0.50727.3053

1 个答案:

答案 0 :(得分:3)

你可以尝试一些事情

  1. 增加 SQLCommandTimeout
  2. 如果您的查询超过请求默认时间,请在web.config文件中增加 HttpRuntime's Execution Time out属性
  3. 增加 ScriptTimeout 属性
  4. 运行SQL Proffiler并优化SQL过程,如果需要更多时间(在查询分析器和数据库调优顾问(DTA)的帮助下)
相关问题