Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8912565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:14:00+00:00 2026-06-15T04:14:00+00:00

I have a ColdFusion template, which will be called via ajax. The template has

  • 0

I have a ColdFusion template, which will be called via ajax.
The template has timeout of seconds like:

<cfsetting showdebugoutput="true" requesttimeout="2" />

But if the timeout occurs, I get no error message back. Is there a way to catch the timeout and respond properly via Ajax?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:14:02+00:00Added an answer on June 15, 2026 at 4:14 am

    I get no error message back

    Do you get anything back? Your response should still contain the text ColdFusion produces. Have you used Chrome, or fire bug or any browser with web tools that allow you to see the response to see if you’re just getting back something you can’t use? Are you using anything with a success/fail callback function that may be suppressing the failure on the client side? If the below suggestion doesn’t help, I’d post your JS and re-tag your question.

    That being said: any time you do anything after the request timeout has expired you’ll want to extend your timeout. onError and try/catch only have a few MS after the timeout to react to the error so sending messages or logging errors will also fail. If you were trying to send an email or write to a file, you’re CF error message would then say your cfmail or cffile action timed out which it did (technically) but it isn’t what caused the initial error.

    You can simply reset the requestTimeout to something a little bigger if you know what the timeout is already.

    <cfsetting requesttimeout="2">
    <cftry>
        <!--- some stuff that takes more than 2 seconds --->
        <cfcatch type = "any">
            <cfsetting requesttimeout="5">
            <!--- logging / error handling for timeout --->
            <!--- NOTE!! This does not add 5 seconds, it adds 3.  --->
            <!--- The value of requestTimeout is the total time of the timeout. --->
        </cfcatch>
    </cftry>
    

    Or you can add time if you don’t know the current timeout value.

    <cftry>
        <!--- some stuff that takes more than your timeout --->
        <cfcatch type = "any">
            <!--- You must first create your object to hold the requestMonitor. --->
            <cfset monitor = createObject("java", "coldfusion.runtime.RequestMonitor") />
            <!--- Then you need to reset your request timeout --->
            <!--- add 5 seconds to the timeout --->
            <cfsetting requesttimeout=monitor.getRequestTimeout()+5>
            <!--- logging / error handling for timeout --->
        </cfcatch>
    </cftry>
    

    You do not have to do this in a try/catch block either, you can include this in your onError event handler if you have one defined in your application.cfc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some ColdFusion code which calls a function in a Java class via:
I have a ColdFusion function foo which takes three args, and the second two
I have a ColdFusion script that does: <cfset content = replace(content,&##147;,,all)> Which replaces &147;
i have a coldfusion cfc and some methods in it. MethodA will return a
I have a Coldfusion CfChart Bar Graph, that has X-Axis = Questions, and Y-Axis
I have scheduled a coldfusion template to run every 10 minutes how do i
An HTML template is passed to Coldfusion. The head tag of the template has
I have seen ColdFusion 9 code which initializes many properties of a structure at
We have ColdFusion and Active Directory running within the same domain. I'm trying to
I have a coldfusion application running right now with a login that sends a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.