Skip to main content
Inspiring
December 4, 2007
Question

timeout for cfstoredproc

  • December 4, 2007
  • 2 replies
  • 2266 views
Hi. Is there a way to set timeout for the tag <CFSTOREDPROC>? I mean, for cfquery, it has a parameter timeout in seconds. How about for CFSTOREDPROC?

I tried using
<cfset startproc = GetTickCount()>
<cfsetting requesttimeout = "20" />
<CFSTOREDPROC PROCEDURE="fsdfsd" DATASOURCE="sfsds">
cfprorparams here.........
</CFSTOREDPROC>
<cfset proc_execute = GetTickCount() - startproc >

proc_execute returns about 30,000 ms which is 30 s. But the timeout needs to end it in 20 s. It seems requesttimeout doesn't include the time it took for the stored procedure executing. That is why I'm looking for a timeout in cfstoredproc. Any suggestions? I don't wanna go to the Oracle server and set the timeout settings. I want it done in Coldfusion. Thanks.
    This topic has been closed for replies.

    2 replies

    Himansu Sekhar Khuntia
    Participating Frequently
    August 7, 2015

    Hi dongzky,

    I am not sure if you had any work around for this or not. But in ColdFusion 10 onwards timeout attribute has been introduced in CFSTOREDPROC tag and it takes the timeout value in seconds.

    Thanks

    December 5, 2007
    There is no timeout attribute for cfstoredproc. Since all the processing is occurring inside the database there is no way for us to time it out. Also, since we do not know the DBMS in advance we could not use any DBMS specific means. If Oracle SQL lets you set it inside the SP, that is your way to go.

    RequestTimeout/page timeouts only cover the time CF is in control of the thread.
    dongzkyAuthor
    Inspiring
    December 7, 2007
    I still don't get it why timeout is not included in cfstoredproc. I mean, cfquery has and it's accessing a database server. Same thing cfstoredproc is doing, accessing also a database server. I hope codfusion will include this in later versions though, not sure yet in CF8.. coz i'm still using 6.1.