Skip to main content
Participating Frequently
July 10, 2009
Question

cfmx7 / oracle 10g / timeouts / interrupting cfquery?

  • July 10, 2009
  • 1 reply
  • 685 views

Here's a problem I can use some advice on.

Our web app has some cfm templates (reports) with long-running cfquery operations, to Oracle.

When cfquery runs longer than the page timeout, what actually happens is this: cfmx7 waits for the Oracle query to finish, then blows up and returns a timeout message to the user.  This is the worst of all possible worlds:  We made the user wait for the whole nasty query to finish, we incurred the database workload, and then we discarded the results and didn't give them back to the user.  We wasted the user's time and the database's time.

Is there a way to get cfmx7 to *interrupt* the query running on the oracle database when the cfm template times out, rather than just hang up waiting for it to complete?

(Of course I know I could lengthen the timeout for the report cfm, and I know all too well that the query needs to run more efficiently. But it would be handy to be able to interrupt the query if possible.)

Thanks!

CFMX7 on Linux behind Apache, Oracle 10.1 on Linux, built in CFMX7 Oracle drivers with Oracle 10.1 client code.

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 10, 2009

    You might be able to do it from Oracle.  We do something similar, but with a different db, and for different reasons.  We use redbrick on AIX.

    We run a cron job on AIX every 5 minutes that looks for queries that have been running on the web for at least 120 seconds.  If we find any, we email some info to people who care and cancel the query.

    I don't know enough about Oracle to know if something similar is possible.

    Participating Frequently
    July 10, 2009

    Right, thanks for that.  Our DBA gets a trouble ticket from our monitor and she kills the query.  But that's labor intensive. I was hoping there's a setting in cf or the oracle driver that would automate this function.