|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
cfquery and request timeouts
Hello,
I have always assumed that when you put a value in Administrator for 'Timeout Requests after (seconds)', the queries would time out after said value also. However, this seems not to be true. For example, I have the value set for pages to timeout after 30 seconds, but when I run a page with a query that runs for 120 seconds, the page does not display the timeout message after 30 secondes, instead it waits for 120 seconds, then displays the message that the page timed out after 30 seconds! The only explanation I have found for this is a tech note, http://www.macromedia.com/support/coldfusion/ts/documents/request_threadwaittimeout.htm, that lists several tags that 'do not obey' the timeout value, however, cfquery is not one of them. Can anyone explain this behavior to me? Thanks, John |
|
#2
|
|||
|
|||
|
Calls to external resources don't obey the timeout value, that is a strictly CF timeout. This would apply to CFHTTP, CFFTP, web service calls via CFINVOKE, queries, COM objects, and other calls.
CFQUERY has it's own timeout attribute that gets passed to the JDBC (or ODBC bridge) driver and it handles the timeout and passes an error back to CF.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Thanks for the reply. The app I am supporting has queries that can run as long a 10 minutes before they return ( I find this to be ridiculous, but I have only been here a couple months, and have not been able to convince people this is a problem). Does that mean that network resources are being held by this page for the entire 10 minutes?
Here is why I am confused. I have timeouts set to 30 seconds in cf admin. When a page with a 10 minute query runs, it chugs for 10 minutes, then when the query returns, the page displays a message that the page timed out after 30 seconds. If the page timed out after 30 seconds, but did not return for 10 minutes, are network resources being held for the entrie time? Thanks, John |
|
#4
|
|||
|
|||
|
Yes, the full query will run so that bandwidth will be used during the time that the database query results are returned. Also, a thread on the CF server will be locked in use during that time.
Yes a 10 minute query is probably a Bad Thing unless you have a really good reason for it. You can also set the timeout on a request-by-request basis by using the <cfsetting> tag. So if you want to extend the timeout JUST for that query, you can place a <cfsetting> tag before the query that will tell the server to allow a longer timeout. |
|
#5
|
|||
|
|||
|
Could you clear up one more thing for me, please. If CF ignores the timeout set in administrator, why does the page display the error message siting a timeout after x seconds, instead of displaying the results of the query?
Thanks!! John |
|
#6
|
|||
|
|||
|
Because the page DID exceed the timeout. CF just can't "get out" of processing the query until the JDBC driver gives something back to it (either a query result set or an error).
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > cfquery and request timeouts |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|