Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

request timeout nightmare

Status
Not open for further replies.

GUJUm0deL

Programmer
Jan 16, 2001
3,676
US
What does this mean?

Code:
The request has exceeded the allowable time limit Tag: CFQUERY

I have tried everything, including:
1) <cfquery name="QName" datasource="#ds#" timeout="99999">

2) Adding <cfflush interval=10> after the </cfquery> tag

3) And adding ?Requesttimeout=999999 in the URL


____________________________________
Just Imagine.
 
Check the timeout value in the CF Administrator. That's the max timeout CF will allow, regardless of what value you specify in the query.

Be careful, though. If you disable Timeout Request or set the value too high, you can easily max out the processes on the server! (I know, I've done it!)



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Sorry, I guess I should explain a little better. The "Timeout Request" is set in the CF Administrator to stop a query after "x" seconds. I believe this is set to 60 seconds by default. If a query takes longer than the specified time, CF stops processing the query and displays your error message. This is basically a (good) safeguard to keep the server from crashing.




Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
I think it applies to requests instead of queries.. But it works fundamentally the same way.. if from start to finish the page takes longer than given Requesttimeout to load, it stops wherever its at..

It helps against simple mistakes.. getting the condition on a conditional loop wrong..

Code:
<cfloop condtion="x LESS THAN 10">
  <cfset x = 1 + 1> (where someone might mean to say x = x + 1)
</cfloop>

That would go on forever and ever til either, the end of time, armageddon or server crash.

Its pretty hard for most queries to take longer than 30 seconds.. I've written pages with about 15000 queries (one of those, run once-because it automates what the programmer to too lazy to do-deals) and had it ake less than 60 seconds..

To quote CF Admin

When checked, requests that take longer than the specified time are terminated. This prevents unusually long requests from occupying server resources and impairing the performance of other requests.

So like I said.. I think that you're getting the error on the cfquery because that's the point in code that's taking crossing CF Admin's max for timeout..

But I could be wrong.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
GUJUm0deL said:
3) And adding ?Requesttimeout=999999 in the URL

Did you have the following in your page?

<cfsetting RequestTimeout = "#URL.RequestTimeout#">

This should override the admin setting.

Hope this helps

Wullie

Fresh Look - Coldfusion Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Hey everyone, thanks for all your responses. Alas, none of the suggestions worked. And instead of wasting valuable time and energy trying to debug we simply moved the script to a new server, and that seemed to work fine (for now).

But I did a google search on this, and no one seems to know the exact reason as to why this happens.


____________________________________
Just Imagine.
 
But I did a google search on this, and no one seems to know the exact reason as to why this happens.

The exact reason is specified above, it is a setting in the CF admin. There is no other reason. [smile]

Hope this helps

Wullie

Fresh Look - Coldfusion Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Wullie, I changed the default timeout to another number, like 320 (seconds), 1000 (seconds), and I still get the same error.




____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top