Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been dealing with this issue on and off for YEARS, dating back to CF 5 and 6.

Out of the blue, Coldfusion just stops delivering email, and the mail just keeps building up in the queue.

To restart the service I can restart coldfusion OR run the following code:

  <cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
  <cfset MailSpoolService = sFactory.mailSpoolService>
  <cfset MailSpoolService.start()>

The solution above is a fix noted on stackoverflow: http://stackoverflow.com/questions/94932/coldfusion-mail-queue-stops-processing

My goal would be to find a log or something that would help point me to the cause of the issue.

Is there a log that will tell me what is causing the mailspoolservice to crash? I can't seem to locate any errors in the CF Admin.

I have also tried to regenerate this issue, and I can't.

I'm currently running CF9 latest hotfixes applied, on windows 2008 r2

share|improve this question

1 Answer 1

up vote 2 down vote accepted

What version of ColdFusion are you running now and on what platform?

You can add some logging information via the ColdFusion administrator under the mail settings. See the documentation for mail logging on ColdFusion 9 here.

Error Log Severity

From the drop-down list object, select the type of SMTP-related error message to write to a log file. The options are the following:

  • Debug (contains Information, Warning, and Error)

  • Information (contains Warning and Error)

  • Warning (contains Error)

  • Error

ColdFusion writes sent-mail and mail-error logs to the following directories:

  • \coldfusion9\logs (Windows server configuration)

  • /opt/coldfusion9/log (Solaris and Linux server configuration)

  • cf_webapp_root/WEB-INF/cfusion/logs (multiserver and J2EE configurations, all platforms)

The email log files generated are:

  • mailsent.log - Records sent e-mail messages.

  • mail.log - Records general e-mail errors.

What is your mail logging set to now?

share|improve this answer
    
I just updated my question with in. Running windows 2008r2, CF9 (but have been having this issue since windows 2003 and cf5 - finally sick of dealing with it). My smtp log was on information, moved it up to debug. The Mail log doesnt reflect any errors relating to events at the time of the error. For example error happened at 10am and last entry was 2 days ago. Mail sent doesnt get updated beyond the date/time of last message sent and doesnt include any error. No application errors either. Was hoping there was a java level log. –  steve Apr 1 '13 at 16:27
    
Am I understanding your issue correctly; the mail files are not being moved to the Undelivr folder, they are stuck in the Spool folder? I'm not really sure how useful the error logging I described above is. I was hoping your setting was off. At the information level you should be getting any errors. Maybe debug will give you something. Could your ColdFusion server be losing it's connection to the mail server? –  Miguel-F Apr 1 '13 at 16:42
    
The problem that I am having and that other people are having is that the spool manager just quits working. Coldfusion drops the message in the spool folder and the spooler doesnt move it to the SMTP or Undeliverable folder (if that was going to be the case). They just sit until you force- restart the mail spool OR restart coldfusion. –  steve Apr 1 '13 at 16:46
    
Have you noticed anything common about the mail files that get stuck? Are they small or large in size? Are they to particular addresses? Is your server processing a lot of email? Does any mail go through while this is happening or is ALL mail suspended? Do you have multiple ColdFusion instances on the server or just one? If more than one, do they all point to the same SMTP server? Do they all experience this? At the same time? Sorry, lots of questions and no answers. Just trying to gather more information. –  Miguel-F Apr 1 '13 at 16:50
    
I can't find anything common. It could get stuck while sending a batch of newsletters or a transactional email. The emails are usually smaller... 4-5kb up to 20kb. The cfmail tag continues to work. I'll get notified from a client that they arent receiving emails they are expecting. When I look at the spool folder it could have anywhere from 25 to 10k messages waiting to go out. I'm only running 1 instance of CF. This problem is in the chain before SMTP would even kick in. –  steve Apr 1 '13 at 16:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.