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

CF10 Mail Sending Problem

New Here ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

Hi,

We found that CF 10 stopped sending emails and on website, we received error:

An exception occurred when setting up mail server parameters. This exception was caused by: coldfusion.mail.MailSpooler$SpoolLockTimeoutException: A timeout occurred while waiting for the lock on the mail spool directory.

We are not sure what caused this problem, but after restarting the CF service everytime, this problem resolves. And this is happening frequently and no way to trace it immediately.Is there any way to trace that CF is not sending email or any updated to fix this problem?

Thanks in advance

Mamun

Views

2.3K

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
Community Expert ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

@Mamun, before offering some thoughts on your problem, I want to share an observation. If perhaps you had googled that message and didn’t find anything that seemed useful, here’s some good news.

I suppose you might have searched the entire message, but if you had left off that opening sentence (“An exception occurred when setting up mail server parameters”) and had searched just for the main part, “This exception was caused by: coldfusion.mail.MailSpooler$SpoolLockTimeoutException: A timeout occurred while waiting for the lock on the mail spool directory”, then the first few results (I see) would seem quite promising for you.

First, consider:

http://stackoverflow.com/questions/8079821/mail-mailspooler-spoollocktimeoutexception

Which mentions first how you could increase the spool timeout, but that isn’t always the right kind of solution, if in fact there is some real root cause problem that can be solved. And to that, some there suggest that the real problem may be due to high disk activity.

More than that, someone points out that for them, the real root cause may in fact be virus scanning happening on the spool. If that’s your problem, then putting that spool directory on your virus scanner’s exclusion list could help.

Or perhaps the above will lead you to consider some other possible source of contention against the spool directory and files.

There are still a couple of other thoughts to consider, some of which are mentioned as comments in the 2nd link:

https://plus.google.com/116693772255012664559/posts/CSj9HVoRTcY

In one, David Boyer points out some code that can be used to reset CF’s internal mail spooler service (not a Windows service, but basically a thread inside CF that watches and manages the mail spool). Since you mention that restarting CF makes the problem go away, it’s something to consider to see if that also may help you recover (if you can’t find the real root cause). That said, I wonder if your solution of restarting CF made things “work” because instead, in the time it took for CF to restart, the lock on the files due to virus scanning was now released. Just a guess, but something to consider.

Finally, one other commenter in that thread wished that “CF should give you the ability to not use the internal spool and spool it directly to your mail server.” Well, there’s good news there. That option was in fact added in CF 6, to both the CF Admin and in CFMAIL tag as a SpoolEnable attribute, which tells CF to NOT use the spool at all. Again, that may not be the real right solution, as using the spool is generally beneficial when it works well for you, as otherwise a request doing CFMAIL has to wait until the destination server confirms receipt of the mail (not the receiving user, mind you. Just the receiving mail server, holding it for them.) But turning off the spooling could be a temporary solution for you while you try to solve the real root cause.

Let us know if that helps.

/charlie


/Charlie (troubleshooter, carehart.org)

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
Explorer ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

LATEST

At one time I was getting similar errors such as the one you reported.  Another issue that was coupled with that was that email would just keep building up in my spool folder and would not be reset until I reset the service factory or coldfusion itself.  This had been an issue that would popup at random, sometimes daily, weekly, or monthly... 

After stirring up some conversation about it on stackoverflow, I found that increasing the JVM memory from the default of 512 mb to 2048mb ultimately made my issue go away.

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