473,729 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection ) +800131

System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateO
bject stateObj) +186

System.Data.Sql Client.TdsParse rStateObject.Re adSniError(TdsP arserStateOb
ject stateObj, UInt32 error) +556
System.Data.Sql Client.TdsParse rStateObject.Re adSni(DbAsyncRe sult
asyncResult, TdsParserStateO bject stateObj) +164
System.Data.Sql Client.TdsParse rStateObject.Re adPacket(Int32
bytesExpected) +34
System.Data.Sql Client.TdsParse rStateObject.Re adBuffer() +44
System.Data.Sql Client.TdsParse rStateObject.Re adByte() +17
System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleR esultSet bulkCopyHandler , TdsParserStateO bject stateObj)
+79
System.Data.Sql Client.SqlDataR eader.ConsumeMe taData() +31
System.Data.Sql Client.SqlDataR eader.get_MetaD ata() +62
System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader
ds, RunBehavior runBehavior, String resetOptionsStr ing) +297
System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async) +1005
System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result) +132
System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method) +32
System.Data.Sql Client.SqlComma nd.ExecuteReade r(CommandBehavi or
behavior, String method) +122
System.Data.Sql Client.SqlComma nd.ExecuteDbDat aReader(Command Behavior
behavior) +12

System.Data.Com mon.DbCommand.S ystem.Data.IDbC ommand.ExecuteR eader(Comman
dBehavior behavior) +7
System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
behavior) +162
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable) +107

NewReportingDat aSetTableAdapte rs.Customer_Sta tistic_Report_B y_DIDTableAd
apter.GetStatis ticsByDIDData(S tring StartDate, String EndDate, String
DID) +455
ClientUsageBLL. GetStatisticsBy DID(String startDate, String endDate,
String DID) +163

[TargetInvocatio nException: Exception has been thrown by the target of
an invocation.]
System.RuntimeM ethodHandle._In vokeMethodFast( Object target, Object[]
arguments, SignatureStruct & sig, MethodAttribute s methodAttribute s,
RuntimeTypeHand le typeOwner) +0
System.RuntimeM ethodHandle.Inv okeMethodFast(O bject target, Object[]
arguments, Signature sig, MethodAttribute s methodAttribute s,
RuntimeTypeHand le typeOwner) +72
System.Reflecti on.RuntimeMetho dInfo.Invoke(Ob ject obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityC hecks) +371
System.Reflecti on.RuntimeMetho dInfo.Invoke(Ob ject obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29

System.Web.UI.W ebControls.Obje ctDataSourceVie w.InvokeMethod( ObjectDataSo
urceMethod method, Boolean disposeInstance , Object& instance) +480

System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteSelect (DataSourceS
electArguments arguments) +1960
System.Web.UI.D ataSourceView.S elect(DataSourc eSelectArgument s
arguments, DataSourceViewS electCallback callback) +17
System.Web.UI.W ebControls.Data BoundControl.Pe rformSelect() +149
System.Web.UI.W ebControls.Base DataBoundContro l.DataBind() +70
System.Web.UI.W ebControls.Grid View.DataBind() +4
System.Web.UI.W ebControls.Base DataBoundContro l.EnsureDataBou nd() +82

System.Web.UI.W ebControls.Comp ositeDataBoundC ontrol.CreateCh ildControls(
) +69
System.Web.UI.C ontrol.EnsureCh ildControls() +87
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +50
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+2041

--

Thanks,
Andrew Cooper
Sep 22 '08 #1
2 2833
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 connectionstrin g or setting the
DbConnection.Co nnectionTimeout 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.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection ) +800131

System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateO
bject stateObj) +186

System.Data.Sql Client.TdsParse rStateObject.Re adSniError(TdsP arserStateOb
ject stateObj, UInt32 error) +556
System.Data.Sql Client.TdsParse rStateObject.Re adSni(DbAsyncRe sult
asyncResult, TdsParserStateO bject stateObj) +164
System.Data.Sql Client.TdsParse rStateObject.Re adPacket(Int32
bytesExpected) +34
System.Data.Sql Client.TdsParse rStateObject.Re adBuffer() +44
System.Data.Sql Client.TdsParse rStateObject.Re adByte() +17
System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleR esultSet bulkCopyHandler , TdsParserStateO bject stateObj)
+79
System.Data.Sql Client.SqlDataR eader.ConsumeMe taData() +31
System.Data.Sql Client.SqlDataR eader.get_MetaD ata() +62
System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader
ds, RunBehavior runBehavior, String resetOptionsStr ing) +297
System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async) +1005
System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result) +132
System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method) +32
System.Data.Sql Client.SqlComma nd.ExecuteReade r(CommandBehavi or
behavior, String method) +122
System.Data.Sql Client.SqlComma nd.ExecuteDbDat aReader(Command Behavior
behavior) +12

System.Data.Com mon.DbCommand.S ystem.Data.IDbC ommand.ExecuteR eader(Comman
dBehavior behavior) +7
System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
behavior) +162
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable) +107

NewReportingDat aSetTableAdapte rs.Customer_Sta tistic_Report_B y_DIDTableAd
apter.GetStatis ticsByDIDData(S tring StartDate, String EndDate, String
DID) +455
ClientUsageBLL. GetStatisticsBy DID(String startDate, String endDate,
String DID) +163

[TargetInvocatio nException: Exception has been thrown by the target of
an invocation.]
System.RuntimeM ethodHandle._In vokeMethodFast( Object target, Object[]
arguments, SignatureStruct & sig, MethodAttribute s methodAttribute s,
RuntimeTypeHand le typeOwner) +0
System.RuntimeM ethodHandle.Inv okeMethodFast(O bject target, Object[]
arguments, Signature sig, MethodAttribute s methodAttribute s,
RuntimeTypeHand le typeOwner) +72
System.Reflecti on.RuntimeMetho dInfo.Invoke(Ob ject obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityC hecks) +371
System.Reflecti on.RuntimeMetho dInfo.Invoke(Ob ject obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29

System.Web.UI.W ebControls.Obje ctDataSourceVie w.InvokeMethod( ObjectDataSo
urceMethod method, Boolean disposeInstance , Object& instance) +480

System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteSelect (DataSourceS
electArguments arguments) +1960
System.Web.UI.D ataSourceView.S elect(DataSourc eSelectArgument s
arguments, DataSourceViewS electCallback callback) +17
System.Web.UI.W ebControls.Data BoundControl.Pe rformSelect() +149
System.Web.UI.W ebControls.Base DataBoundContro l.DataBind() +70
System.Web.UI.W ebControls.Grid View.DataBind() +4
System.Web.UI.W ebControls.Base DataBoundContro l.EnsureDataBou nd() +82

System.Web.UI.W ebControls.Comp ositeDataBoundC ontrol.CreateCh ildControls(
) +69
System.Web.UI.C ontrol.EnsureCh ildControls() +87
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +50
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.C ontrol.PreRende rRecursiveInter nal() +170
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+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 connectionstrin g or setting the
DbConnection.Co nnectionTimeout 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
1792
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. When the Active X is lauched, a PDF is pushed as a stream to Internet Explorer, which calls the Acrobat Reader plugin to view it. When some of my users click on the Back button to get out of the PDF report,
2
2112
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 web request. Please review the stack trace for more information about the error and where it originated in the code. SQLExpress database file auto-creation error: The connection string specifies a local SQL Server Express instance using a...
28
2092
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 message. How can I figure out before I display the value if the frame 'MyFrame', the form 'MyForm' and also the input box 'MyInput' exists without getting an error message? Stefan
0
3714
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) : base(message){} public FtpException(string message, Exception innerException) : base(message,innerException){}
3
4075
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 from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). We are getting exceptions during the HTTP send/receive inside the web service method. The exception...
3
5866
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 timeout period elapsed prior to completion of the operation or the server is not responding. I have changed the setting for Execution time-out to 0 in Tools-
1
2332
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 procedures. Nobody is doing a call on that procedure. What could be the reason for it.
3
6216
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 sometimes I get about half of the response string with beginning cut off. About half the time an empty string is returned, the other ~half time good response, and more rarely I get partial response. When I try to use the same Serial instance to...
1
2407
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 object I know how to set the Command.Timeout to account for this but I can't find the Timeout property on the ObjectDataSource to do this. How can I set the Timeout property on an ObjectDataSource? Thanks, Andrew
0
8766
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9217
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3244
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2698
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.