I have a page that runs a lot of join queries. The page usually runs in 5-10 seconds, but sometimes it runs 60+ seconds and is causing our server to crash. While I optimize that page is there a way to stop a CF page from running when a certain page load time is reached?
For example, when the page load time is at 30 seconds I want it to stop running. Is there a way to do that?
Weezer, sadly the CF request timeout features (like the Admin settings page timeout, or CFSETTING requesttimeout) do NOT stop a request once it exceeds that time. It will not be able to stop it as long as the CF request is waiting for something ELSE outside of CF…such as a cfquery, or a cfhttp.
But if the datasources you are using (for those long queries) are using one of CF’s built-in db drivers, those offer a query timeout feature (which works even when a cfquery TIMEOUT time is not honored).
For more on both of those, see two blog posts I’ve done on each topic:
https://www.carehart.org/blog/client/index.cfm/2010/10/15/Lies_damned_lies_and_CF_timeouts
https://www.carehart.org/blog/client/index.cfm/2010/7/14/hidden_gem_in_cf9_admin_querytimeout
Can you consider those, and let us know if either helps you?
You must be logged in to post a comment.