Skip to main content
Participant
July 29, 2010
Question

way to apply cfsetting requesttimeout to function using cfajaxproxy?

  • July 29, 2010
  • 1 reply
  • 1683 views

I have a page of code that uses a cfajaxproxy to access an ajax function in javascript. We are on CF8.

The javasript function works beautifully.

But depending on search parameters selected on the page, the cfquery in the function sometimes takes longer than the server timeout of 60 seconds. Without increasing the timeout on the server in ADMIN, is there a way to apply a timeout to a function? Thinking that that timeout setting should start when the function is called, I put cfsetting as the first line in the function, but it causes an error. I remove the cfsetting line, and the function works fine.

<cfcomponent

hint="Ajax Case Manager" output='false'>

     <cffunction

name="findManager" access="remote" output='false' returnFormat="json">

          <cfsetting requesttimeoutwarning="90" />

          ... rest of function

Then I tried the, which DOES NOT cause an error, but does it work? Or is cfsetting ignored?

<cfcomponent

hint="Ajax Case Manager" output='false'>

     <cfsetting requesttimeoutwarning="90" />

     <cffunction

name="findManager" access="remote" output='false' returnFormat="json">

          ... rest of function

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 29, 2010

    I think you should reread the docs for and verify what attributes it takes.

    What was the error you were getting with the first version of your code?

    --

    Adam

    awi_flaAuthor
    Participant
    July 30, 2010

    For those interested, I forgot to put the cfsetting after the arguments in the function. It then worked.