• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

<cfexchangemail> aborts?

Enthusiast ,
Aug 27, 2010 Aug 27, 2010

Copy link to clipboard

Copied

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

TOPICS
Advanced techniques

Views

446

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 30, 2010 Aug 30, 2010

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation