ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old November 19th, 2004, 11:36 AM
jperez jperez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 jperez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 42 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 19th, 2004, 12:06 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
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

Reply With Quote
  #3  
Old November 19th, 2004, 02:37 PM
jperez jperez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 jperez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 42 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old November 19th, 2004, 03:15 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
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.

Reply With Quote
  #5  
Old November 19th, 2004, 03:23 PM
jperez jperez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 jperez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 42 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old November 19th, 2004, 04:23 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
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).

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > cfquery and request timeouts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway