1 Reply Latest reply on Aug 30, 2010 9:28 AM by Reed Powell

    <cfexchangemail> aborts?

    Reed Powell Level 3

      I have a job that runs once per hour to check for incoming emails that contain data files needing to be processed.  It loops over a number of Exchange INBOXs.  Normally runs just fine.  Starting earlier this week it began aborting when it got to a specific inbox and tried to detach the attachment from one of its messages.  It doesn't have any problems logging into the inbox, or listing its contents - but when it sees that one of the messages is one that needs to be processed, it does the code below, which never returns from the call to Exchange.  No errors show up anywhere, but since the scheduled task log file is closed that tells me that the CF scheduler actually finished the job - if it had hung up or if CF had died, I would have seen a zero-length log file.

       

                <!--- copy attachment into temp folder --->
                <br>    Detaching attachment...<cfflush>
                <cfset detachOK="Y">
                <cftry>
                 <cfexchangemail action="getAttachments"
                 connection="exchangeConnection"
                 uid="#inbox.UID#"
                 name="attachInfoX"
                 attachmentPath="#request.DownloadTempDirectory#\"
                 generateUniqueFilenames="false">
                 <cfcatch type="ANY">
                  <cfset detachOK="N">
                  <br>    FAILED:
                  <cfdump var="#cfcatch#">
                 </cfcatch>
                </cftry>
                Done

                <cfflush>

       

      It is a scheduled task, and so there is a log file to look at, and the last thing in the file is "Detaching attachment..."

       

      If I run it in a browser instead of as a scheduled task, I get the same output.

       

      I've tried changing the "generateUniqueFilenames" to "true" but that didn't help.

       

      One other data point is that 2 weeks ago I upgraded from CF8 to CF9 (not 9.01, just the original CF9 release), but  this problem only started happening early this current week.  Sometimes if I just let it keep running each hour on its schedule, after a couple of runs it works just fine. 

       

      The CFCATCH isn't trapping anything.  The CFEXCHANGE tags don't seem to have any sort of Timeout= value (big mistake if you ask me, for a tag that's talking to an external box/application).

       

      I'm out of ideas on how to track this down, since it's not leaving any tracks that I can find.  All ideas, no matter how strange, are welcome?

       

      thanks,

      -reed

        • 1. Re: <cfexchangemail> aborts?
          Reed Powell Level 3

          A couple more data points about this problem:  The attachment being detached is pretty big - about 20mb. The exchange inbox is pretty big - about 4gb (working on getting that cleaned out).  And it seems that if I restart CF then the next time the job runs it works ok.

           

          -reed