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?
in the mail log, we have instances of the following error, but not for this last occurrance:
com.sun.mail.smtp.SMTPSendFailedException: [EOF] (on threadID of scheduler-0)
in the server log, we have some instances of long running pages. Again, this did not occur the last time we got the error:
"Warning","ajp-bio-8012-exec-248","09/12/12","02:12:30",,"Thread: ajp-bio-8012-exec-248, processing template: E:\WEB\(path removed).cfm, completed in 750 seconds, exceeding the 30 second warning limit"
there is no instance in the exception log.
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.
+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.
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:
I implemented this in my Application.cfc and I have yet to see a timeout error falsely charged to the cfmail again.
North America
Europe, Middle East and Africa
Asia Pacific