4
votes

We're facing a sever timeout error on NopCommerce - ASP.net MVC3 web application.

The error just resloves for sometime when we end the sql process. On ending it starts to work just fine for some time and then again it starts to occur.

This is happening since last few days only, before that it was working fine. Note that no major update has been made in its code.

We're clueless as what could be the problem and how to investigate and fix it? Is it a connection pool related issue or what?

Here is the stacktrace:

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, Dictionary2 identifierValues, List1 generatedValues) +269 System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +528

1

1 Answers

3
votes

@Dharmik Bhandari, There might be several issues. Try the following things

  • Increase the pool size
  • set CommandTimeOut = 0 (infinite)
  • set ConnectionTimeOut = 0 (infinite)
  • Release the connection resources as soon as the database functionality overs