2012-05-03 24 views
4

我們正在面對NopCommerce - ASP.net MVC3 Web應用程序發生服務器超時錯誤。如何調查ASP.net應用程序上的SQL Server超時錯誤?

當我們結束sql過程時,錯誤只會重新出現。結束它開始工作一段時間,然後又開始發生。

這是發生在最近幾天以前,只是在它工作正常。請注意,其代碼中沒有進行重大更新。

我們不知道可能是什麼問題以及如何調查和解決問題?這是連接池相關的問題還是什麼?

這裏是堆棧跟蹤:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +296 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +415 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2657 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +88 System.Data.SqlClient.SqlDataReader.get_MetaData() +114 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +505 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1896 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +480 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +854 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +22 System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary 2 identifierValues, List 1 generatedValues) +269 System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +528

回答

3

@Dharmik班達裏,可能有幾個問題。試試下面的事情

  • 增加池大小
  • 集的CommandTimeout = 0(無限)
  • 集ConnectionTimeOut = 0(無限)
  • 釋放連接資源,一旦數據庫功能接管
相關問題