SQL Timeout exceptions for asp.net 2.0 apps
-
04 Mei 2012 10:35
I am frequently receiving below SQL timeout exceptions for some of my asp.net 2.0 applications, ADO.NET settings are configured with default values. Some times end users ae receiving error page in Application.
Database Error ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
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.ExecuteDbDataReader(CommandBehavior behavior)
Semua Balasan
-
04 Mei 2012 15:17Moderator
Hello,
The default timeout for the execution of a command is 30 seconds.
Please, could you provide an example of commands which are giving timeouts or is it absolutely random ?
Please, could you provide the full version ( 2000,2005,2008,2008 R2,2012 + last installed service pack ) and edition ( MSDE , Express , Web , Standard , Entreprise,...) ?
We are waiting for your feedback to try to help you more efficiently.
Have a nice day
PS : as you may have about TDSParse, i would suggest to have a look at this link
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
-
08 Mei 2012 8:43
Timeouts were happening in Random, if default timeout of command is the issue, how i can collect more statistics to prove the issue.
SQL server 2008 R2 64 bit & OS- Windows Server 2008 R2 Enterprise
-
08 Mei 2012 10:43Moderator
Hello,
just an excellent ( but too often unknown ) article about timeout with SQL Server (login/commands)
http://blogs.msdn.com/b/mattn/archive/2008/08/29/sqlclient-timeouts-revealed.aspx
I go on to search
Have a nice day
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
- Ditandai sebagai Jawaban oleh KJian_ 10 Mei 2012 6:00