Skip navigation
ggantzer2
Currently Being Moderated

CFMail timeout issues

Sep 12, 2012 6:13 AM

Tags: #cfmail #cf10

We have a set of scheduled tasks that run overnight and handle records reconcilliation in a database. the tasks take a long time to run...an hour or so.  When these processes complete, we use a CFMail tag to send out some results. We are consistently getting the following error:

 

The request has exceeded the allowable time limit Tag: cfmail

 

In the beginning of the CFM page, we use the following setting:

<cfsetting enableCFoutputOnly = "No" requesttimeout="10800">

 

Our CFAdmin has

set to 60. Changing that value would seem to cause problems elsewhere. Does anyone know why this would be occurring or how we can address it?

 
Replies
  • Currently Being Moderated
    Sep 12, 2012 6:15 AM   in reply to ggantzer2

    What do the logs indicate?

     

    ^_^

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 7:02 AM   in reply to ggantzer2

    There should be an indication in the server, exception, or mail log.

     

    ^_^

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 7:20 AM   in reply to ggantzer2

    Setting the timeout attribute in your cfquery tags is worth a shot. 

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 8:24 AM   in reply to ggantzer2

    When I've had timeout errors thrown on the cfmail tag, the timeout usually is happening somewhere else in the code prior to the actual cfmail tag.  I have a cfmail tag in my Application.cfc onError() method to send me alerts.  If an extremely long-running page times out, the error that gets logged links the timeout to the cfmail tag when it is really the code that proceeds the cfmail tag that has timed out.

     

    So in other words, check the rest of your code before accepting the error message at face value.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 8:36 AM   in reply to Carl Von Stetten

    +1 to what Carl said.  I have seen this issue as well.  The reported tag in the error may not be the offending tag.

     

    Ben Nadel (of course) has a possible work-around for this.  I have implemented his suggestion and it seems to work.  Basically you just add a little more time to the request for your error handling to complete gracefully.

     

    http://www.bennadel.com/blog/916-Graceful-ColdFusion-Timeout-Disaster- Recovery-Thanks-Barney-Boisvert-.htm

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 12, 2012 8:52 AM   in reply to Miguel-F

    That Ben Nadel post is excellent!

     

    I had previously found another blog post that addressed my specific issue in the onError() method of Application.cfc that may also be useful to you:

     

    http://blog.pengoworks.com/index.cfm/2012/6/28/Forcing-your-Applicatio nonError-event-to-run-to-completion-in-ColdFusion

     

    I implemented this in my Application.cfc and I have yet to see a timeout error falsely charged to the cfmail again.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points