By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Getting a Timeout Error

P: n/a
Greetings,

I've got a website that has several pages with DataGrid controls on
them. The controls are bound to Object Datasources. On one of the
pages I keep getting a "Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding."
error. The data is being filled from a Stored Procedure on an SQL
Server. When I run the Stored Procedure on the actual server, it is
only taking 24 seconds or so to run and the timeout setting on the
ASP.NET website is set to 120 seconds. Other pages on the site that
have similar queries are working fine. Is there anything else that
might be causing the timeout?

Below is a copy of the error message...

[SqlException (0x80131904): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +800131

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateO
bject stateObj) +186

System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateOb
ject stateObj, UInt32 error) +556
System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
asyncResult, TdsParserStateObject stateObj) +164
System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
bytesExpected) +34
System.Data.SqlClient.TdsParserStateObject.ReadBuf fer() +44
System.Data.SqlClient.TdsParserStateObject.ReadByt e() +17
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
+79
System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior, String method) +122
System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior
behavior) +12

System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(Comman
dBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107

NewReportingDataSetTableAdapters.Customer_Statisti c_Report_By_DIDTableAd
apter.GetStatisticsByDIDData(String StartDate, String EndDate, String
DID) +455
ClientUsageBLL.GetStatisticsByDID(String startDate, String endDate,
String DID) +163

[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Objec t target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks) +371
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29

System.Web.UI.WebControls.ObjectDataSourceView.Inv okeMethod(ObjectDataSo
urceMethod method, Boolean disposeInstance, Object& instance) +480

System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceS
electArguments arguments) +1960
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments
arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82

System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls(
) +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+2041

--

Thanks,
Andrew Cooper
Sep 22 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
At a glance it looks like the timeout is not from your page, but from your
Database connection.
Try adding a timeout entry in the connectionstring or setting the
DbConnection.ConnectionTimeout property.

Cheers,
Louis

"Andrew Cooper" wrote:
Greetings,

I've got a website that has several pages with DataGrid controls on
them. The controls are bound to Object Datasources. On one of the
pages I keep getting a "Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding."
error. The data is being filled from a Stored Procedure on an SQL
Server. When I run the Stored Procedure on the actual server, it is
only taking 24 seconds or so to run and the timeout setting on the
ASP.NET website is set to 120 seconds. Other pages on the site that
have similar queries are working fine. Is there anything else that
might be causing the timeout?

Below is a copy of the error message...

[SqlException (0x80131904): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection) +800131

System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateO
bject stateObj) +186

System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateOb
ject stateObj, UInt32 error) +556
System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult
asyncResult, TdsParserStateObject stateObj) +164
System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32
bytesExpected) +34
System.Data.SqlClient.TdsParserStateObject.ReadBuf fer() +44
System.Data.SqlClient.TdsParserStateObject.ReadByt e() +17
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
+79
System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior, String method) +122
System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior
behavior) +12

System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(Comman
dBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107

NewReportingDataSetTableAdapters.Customer_Statisti c_Report_By_DIDTableAd
apter.GetStatisticsByDIDData(String StartDate, String EndDate, String
DID) +455
ClientUsageBLL.GetStatisticsByDID(String startDate, String endDate,
String DID) +163

[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Objec t target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks) +371
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29

System.Web.UI.WebControls.ObjectDataSourceView.Inv okeMethod(ObjectDataSo
urceMethod method, Boolean disposeInstance, Object& instance) +480

System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceS
electArguments arguments) +1960
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments
arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82

System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls(
) +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+2041

--

Thanks,
Andrew Cooper
Sep 23 '08 #2

P: n/a
Louis Somers wrote:
At a glance it looks like the timeout is not from your page, but from your
Database connection.
Try adding a timeout entry in the connectionstring or setting the
DbConnection.ConnectionTimeout property.

Cheers,
Louis
That was it. I should have known that. Sometimes its the stupid,
little things that get you.

Thanks, Louis.

Andrew
Sep 23 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.