Skip to main content
Gary__F
Inspiring
October 26, 2009
Question

1000's of emails not created until server rebooted!

  • October 26, 2009
  • 1 reply
  • 1715 views

Users were complaining that 1000's of emails were not being sent via our CF service. I checked the spool directory and it was empty, as was Undelivr. Our own application logs showed the cfmail routine had been called but full mail logging via the CF Administrator showed nothing had been sent. So where on earth have the emails gone?

Through frustration we just did an emergency reboot of the affected server from the cluster and as soon as it rebooted 1000's of emails appeared in the spool directory. This included every email going back since the problem manifested.

Where does CF store its emails before it puts them into the spool dir? Surely it must have written them to disk someone else that isn't documented? How else could it generate all of the missing emails after a reboot without any prompting? Maybe Java itself had a problem and has its own mail spool dir that then feeds into the CF spool dir?

Any answers would be useful in case this problem ocurrs again.

Thank you.

Gary.

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 30, 2009

    Where does CF store its emails before it puts them into the spool dir? Surely it must have written them to disk someone else that isn't documented? How else could it generate all of the missing emails after a reboot without any prompting? Maybe Java itself had a problem and has its own mail spool dir that then feeds into the CF spool dir?

    If CF is set to spool (as per CFAdmin setting), then it should indeed write the messages to the spool dir before sending 'em.  Is that setting set?  As far as I know, if it's not set to spool, then it sends the messages straight away.

    It sounds like you might have all the various mail logging options set (are they set to debug?).

    Is anything being logged on the mail server side of things which might indicate a problem?

    Was it just the CF service you restarted, or was it the whole box that also possibly had the SMTP server on it too?  IE: did the mail definitely get jammed up on the CF side of things?

    Are you absolutely certain that whatever process generates the emails had actually run?  Was it from a scheduled task or is there some logic in your code that might kick in when the application is in a certain state or anything like that?

    Sounds a bit odd.

    --

    Adam

    Gary__F
    Gary__FAuthor
    Inspiring
    October 30, 2009

    Hi Adam. Thanks for the reply.

    Our CF servers are set to spool to disk. Logging was off when we first got wind of the problem so we activated "debug" mail logging and also the option to log all sent emails. We then watched users choose our app's function to send more emails but nothing was added to these log files. The SMTP service had nothing in its queue or badmail directory.

    Our email creation routine is in an asynchronous gateway event and one line of code in there logs how many emails it has generated. It logged about 2000 more emails since we started looking into the problem so we knew the code around cfmail was running correctly, but it was weird that CF's mail logging recorded absolutely nothing and nothing was added to the spool directory. So what was cfmail doing?

    Through frustration of realising the problem was out of our hands since our code was logging that it was calling cfmail and CF logged nothing, we did an emergency reboot of the server (the physical box which also has an SMTP service). As soon as Windows booted up again the empty spool folder was flooded with 1000's of files. Where the frak did they come from? This is why I suspect the Java engine had created and stored the mail files but got stuck and hadn't handed them over to CF, hence the lack of CF logging any mail activity. What other explanation could there be? Crazy!

    Inspiring
    October 31, 2009

    OK, well: all things considered, if I was you I'd be raising a support call with Adobe at this point.

    You've certainly troubleshot (troubleshooted?) along the same lines as I would, and I'm drawing a blank as to what else to try.

    --

    Adam