dbTalk Databases Forums  

Timeout

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Timeout in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BrassicaNigra
 
Posts: n/a

Default Timeout - 12-08-2009 , 02:19 PM






I have a GridView that uses a SqlDataSource.Select command to fill with data.
The user can specify a date range for the select statement and when the
query returns a very large number of rows, I receive the following error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection String, but
that did not make any difference.

Again, this works fine if the number of rows is smaller.

What do I need to do to correct this?

Reply With Quote
  #2  
Old   
Russell Fields
 
Posts: n/a

Default Re: Timeout - 12-08-2009 , 04:58 PM






There is Connection Timeout and Command Timeout. You should be setting the
Command Timeout.
Both of these timeouts can be set to 0, which means that they will never
timeout.

If you are actually setting Command Timeout, are you saying that setting a
longer timeout such as 60 seconds still timed out after 30 seconds? Or did
it timeout after 60 seconds?

RLF


"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote

Quote:
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when the
query returns a very large number of rows, I receive the following error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection String,
but
that did not make any difference.

Again, this works fine if the number of rows is smaller.

What do I need to do to correct this?

Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Timeout - 12-08-2009 , 05:50 PM



BrassicaNigra (brassica_nigra (AT) community (DOT) nospam) writes:
Quote:
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when the
query returns a very large number of rows, I receive the following error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection String,
but that did not make any difference.
No, because this is a command timeout. You need to set the Command
Timeout which is a property on the Command object. Maybe it's available
on the Connection object too.

You should also ask yourself whether it is acceptable for the user to
wait this long - and particularly: will he actually want all these rows?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #4  
Old   
BrassicaNigra
 
Posts: n/a

Default Re: Timeout - 12-10-2009 , 11:12 AM



Russel,

Thanks for your response. Can you tell me how to set the command timeout
property for a SqlDataSource.Select command? I have searched and do not find
any way to do this.

Dale


"Russell Fields" wrote:

Quote:
There is Connection Timeout and Command Timeout. You should be setting the
Command Timeout.
Both of these timeouts can be set to 0, which means that they will never
timeout.

If you are actually setting Command Timeout, are you saying that setting a
longer timeout such as 60 seconds still timed out after 30 seconds? Or did
it timeout after 60 seconds?

RLF


"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message
news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com...
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when the
query returns a very large number of rows, I receive the following error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection String,
but
that did not make any difference.

Again, this works fine if the number of rows is smaller.

What do I need to do to correct this?


.

Reply With Quote
  #5  
Old   
BrassicaNigra
 
Posts: n/a

Default Re: Timeout - 12-10-2009 , 11:14 AM



Erland,

Thanks for your response. Can you tell me how to set the command timeout
property for a SqlDataSource.Select command? I have searched and do not find
any way to do this.

I have one user that infrequently needs this data and has been very happy
getting it this way. Most of my GridViews only return a few rows because as
you pointed out the users do not want to wait.

Dale


"Erland Sommarskog" wrote:

Quote:
BrassicaNigra (brassica_nigra (AT) community (DOT) nospam) writes:
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when the
query returns a very large number of rows, I receive the following error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection String,
but that did not make any difference.

No, because this is a command timeout. You need to set the Command
Timeout which is a property on the Command object. Maybe it's available
on the Connection object too.

You should also ask yourself whether it is acceptable for the user to
wait this long - and particularly: will he actually want all these rows?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

.

Reply With Quote
  #6  
Old   
Russell Fields
 
Posts: n/a

Default Re: Timeout - 12-10-2009 , 11:48 AM



Dale,

Well, I looked up your problem and found this on Connect:
http://connect.microsoft.com/VisualS...dbackID=103947

One man's workaround:
http://www.developmentnow.com/blog/S...d+Timeout.aspx

Hope that helps you,
RLF

"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote

Quote:
Russel,

Thanks for your response. Can you tell me how to set the command timeout
property for a SqlDataSource.Select command? I have searched and do not
find
any way to do this.

Dale


"Russell Fields" wrote:

There is Connection Timeout and Command Timeout. You should be setting
the
Command Timeout.
Both of these timeouts can be set to 0, which means that they will never
timeout.

If you are actually setting Command Timeout, are you saying that setting
a
longer timeout such as 60 seconds still timed out after 30 seconds? Or
did
it timeout after 60 seconds?

RLF


"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message
news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com...
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when
the
query returns a very large number of rows, I receive the following
error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection
String,
but
that did not make any difference.

Again, this works fine if the number of rows is smaller.

What do I need to do to correct this?


.

Reply With Quote
  #7  
Old   
BrassicaNigra
 
Posts: n/a

Default Re: Timeout - 12-10-2009 , 02:42 PM



thanks! that worked!

"Russell Fields" wrote:

Quote:
Dale,

Well, I looked up your problem and found this on Connect:
http://connect.microsoft.com/VisualS...dbackID=103947

One man's workaround:
http://www.developmentnow.com/blog/S...d+Timeout.aspx

Hope that helps you,
RLF

"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message
news:5B5FE155-9E3E-4287-A003-FD215313A652 (AT) microsoft (DOT) com...
Russel,

Thanks for your response. Can you tell me how to set the command timeout
property for a SqlDataSource.Select command? I have searched and do not
find
any way to do this.

Dale


"Russell Fields" wrote:

There is Connection Timeout and Command Timeout. You should be setting
the
Command Timeout.
Both of these timeouts can be set to 0, which means that they will never
timeout.

If you are actually setting Command Timeout, are you saying that setting
a
longer timeout such as 60 seconds still timed out after 30 seconds? Or
did
it timeout after 60 seconds?

RLF


"BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message
news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com...
I have a GridView that uses a SqlDataSource.Select command to fill with
data.
The user can specify a date range for the select statement and when
the
query returns a very large number of rows, I receive the following
error
message after about 30 seconds;

'The timeout period elapsed prior to completion of the operation or the
server is not responding.'

I have tried increasing the Connection Timeout in the Connection
String,
but
that did not make any difference.

Again, this works fine if the number of rows is smaller.

What do I need to do to correct this?


.


.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.