472,354 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

Getting a Timeout Error

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
2 2761
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nicolas Verhaeghe | last post by:
I have designed an application which uses the Crystal Reports 8.5 ActiveX to show a report as a PDF. The report is compiled from a SQL database populated through web forms programmed in ASP. ...
2
by: David Hearn | last post by:
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...
28
by: Stefan Mueller | last post by:
I can display the value of the following input box with alert(parent.MyFrame.document.MyForm.MyInput.value); But if the frame, the form or the input box doesn't exist I get of course an error...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
3
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously...
3
by: M Bourgon | last post by:
On SSMS 9.00.3042.00, any query that runs longer than 10 minutes gets the following error message: The statement has been terminated. Msg -2, Level 11, State 0, Line 0 Timeout expired. The...
1
by: Rahul Babbar | last post by:
Hi, I am getting a error sqlcode : -911, sqlstate : 40001 error, i.e. Deadlock error while trying to drop the procedure. I had seen cases of getting deadlocks in a table but not in...
3
by: Rainy | last post by:
Hello! I'm having some trouble with pyserial package, I'm sending commands and reading responses from a custom pcb, and sometimes I get a proper response, at other times I get nothing, and...
1
by: Andrew Cooper | last post by:
I've got a report that is using an ObjectDataSource to populate its data. The problem is that the report takes longer than 30 seconds to generate so it times out. If I were using an SQLDataSource...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.