473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Timeout on my request!


Hello,
In my asp.net application i need to retreive data from my MS SQL db. The
query takes more then 3 minutes.
I get a timeout after about 30 seconds. I have change the sqlCommandTimeout
default value of the <sessionState to 12000 in web.config. I still get the
same timeout problem.

Does anyone know how i solve the timeout problem.

Thanks
Smith
Sep 6 '07 #1
8 1577
"Smith" <Sm***@pricateemail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
Hello,
In my asp.net application i need to retreive data from my MS SQL db. The
query takes more then 3 minutes.
I get a timeout after about 30 seconds. I have change the
sqlCommandTimeout default value of the <sessionState to 12000 in
web.config. I still get the same timeout problem.

Does anyone know how i solve the timeout problem.

How are you specifying the setting? Note that the sqlCommandTimeout
attribute is a TimeSpan attribute:
http://msdn2.microsoft.com/en-us/lib...z9(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 6 '07 #2
>
How are you specifying the setting? Note that the sqlCommandTimeout
attribute is a TimeSpan attribute:
http://msdn2.microsoft.com/en-us/lib...z9(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Below how i do it:

<sessionState

sqlCommandTimeout="12000"

cookieless="true"

timeout="20"

/>

Thanks

/S
Sep 6 '07 #3
"Smith" <Sm***@pricateemail.comwrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
sqlCommandTimeout="12000"
Hmm - that's a *HUGE* amount of time to wait for results from a database
query... 12,000 seconds = 200 minutes = over 3 hours...

I'm not aware that the sqlCommandTimeout has a maximum value but, just in
case, have you tried setting it to something a bit more sensible e.g. 300 (=
5 minutes)...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 6 '07 #4
"Smith" <Sm***@pricateemail.comwrote in message
news:uS**************@TK2MSFTNGP04.phx.gbl...
It all depends on the kind of data you work with. We are looking at
scientifc data here.
Data is data is data, at the end of the day...
Some of our queries can span over several hours.
In which case, I would be considering a different architecture, as the web
simply isn't designed for this kind of delay between Request and Response...

Have you thought about maybe some sort of messaging system where queries are
queued up waiting to be processed, and then the results emailed to the user
maybe as a PDF...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 6 '07 #5
First, check the estimated execution plan of your query and, if it's
possible, try to optimize it.
If you have already done that,
why don't you schedule your query to run in background each night (or
each hour) and save the results in a DB table?
At this point in your web page do a simple 'select' statement to show
the data...surely it'll be faster.
:-)

On Sep 6, 3:40 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"Smith" <Sm...@pricateemail.comwrote in message

news:uS**************@TK2MSFTNGP04.phx.gbl...
It all depends on the kind of data you work with. We are looking at
scientifc data here.

Data is data is data, at the end of the day...
Some of our queries can span over several hours.

In which case, I would be considering a different architecture, as the web
simply isn't designed for this kind of delay between Request and Response...

Have you thought about maybe some sort of messaging system where queries are
queued up waiting to be processed, and then the results emailed to the user
maybe as a PDF...?

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net

Sep 6 '07 #6
een Request and Response...
>
Have you thought about maybe some sort of messaging system where queries
are queued up waiting to be processed, and then the results emailed to the
user maybe as a PDF...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
I understand your concerns Mark. And you are right. I think i have to take
this up with management. Some of this does not really make sens in the web
world.
Users select a combination of data and we calculate what the asked for on
the DB server, then return the data.
Users are prompted with a pop up window with an estimation of the time the
computation will take. As i said earlier, we are working in the scientific
community. Users previously got an FTP link to the data and dowloaded. Now,
progress mean, the data can be streamed to them. The data is highly
compressable, so dowload is not a problem.

But i understand we need to review the architecture. And again, computation
has been gratly optimised on the DB server.

Cheers
Smith
Sep 6 '07 #7
you are changing the timeout on a session fetch, not a sqlquery, so it
has no impact. the SqlCommand you are using has a CommandTimeout
property you can set. you will also need to change the page timeout so
it doesn't timeout also.

three minutes is too long, the browser may give up, the user will. you
should start a background thread to do the query and have the browser
poll for completion.

-- bruce (sqlwork.com)

Smith wrote:
Hello,
In my asp.net application i need to retreive data from my MS SQL db. The
query takes more then 3 minutes.
I get a timeout after about 30 seconds. I have change the sqlCommandTimeout
default value of the <sessionState to 12000 in web.config. I still get the
same timeout problem.

Does anyone know how i solve the timeout problem.

Thanks
Smith

Sep 6 '07 #8

"bruce barker" <no****@nospam.comwrote in message
news:eA**************@TK2MSFTNGP06.phx.gbl...
you are changing the timeout on a session fetch, not a sqlquery, so it has
no impact. the SqlCommand you are using has a CommandTimeout property you
can set. you will also need to change the page timeout so it doesn't
timeout also.

three minutes is too long, the browser may give up, the user will. you
should start a background thread to do the query and have the browser poll
for completion.

-- bruce (sqlwork.com)
Hi Bruce,
could you please give an example of your CommandTimeout ?

Thanks
Smith
Sep 6 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: alien2_51 | last post by:
I have an ASP.Net application running one level above the root web server. The root web server is configured for a 60 min session timeout. If I omit the timeout setting in the web.config eg..{...
8
by: P. Glassel | last post by:
I'm having problems getting session timeouts to change programmaticlaly under IIS6.0. This is unchanged code that ran as expected under IIS5.0. Anyone else run into this problem? Thx.
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
8
by: Shalini | last post by:
If I have an ASPX page that is just sleeping for 3 minutes ormore and later does some processing and the ExecutionTimeout parameter in the machine.config is 90 seconds then the page does not...
1
by: Greg Allen | last post by:
I have a timeout issue with a long running web service, and I can't figure out where the timeout value is coming from. In the client I end up getting the following exception: The underlying...
0
by: Christopher H. Laco | last post by:
I'm in a strange situation. I have a dataset that uses it own connection string from MySettings. All is well. This thing works in .NET just dandy. If I reference this dataset from another...
5
by: Ed | last post by:
I have some questions in regards to Session variables and IIS Recycling: 1. Does the IIS setting 'Shutdown worker process after being idle' affect an application's session variables? Or is IIS...
1
by: tudor | last post by:
I have a web service that I use to kick off a long-running job that dumps a lot of data to an XML file (takes about 5 minutes). I need to have ASP.NET produce the XML file as the web site has the...
12
by: Sophie000 | last post by:
I am implementing a peer-to-peer program: When a computer A receives “get file XXX” from stdio, it broadcasts (floods) a request packet to ask others. Both Computer B and C have the file so they...
2
by: JimLad | last post by:
Hi, I've got a very basic asp.net page that accesses a very slow db query and siplays to screen. I'm hitting a timeout aftre about 3.5 to 4.5 minutes - seems to be variable. SQL connection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.