From time to time we’ve has this ColdFusion error occur over a period of years regarding the setup of mail server parameters:

Message: An exception occurred when setting up mail server parameters. Detail : This exception was caused by: javax.mail.MessagingException:
Connect failed; nested exception is: Read timed out.

Once in this state, ColdFusion would no longer send emails anymore and the only solution was to restart CF. There are a number of discussions in the blogosphere and StackOverflow which we did look into and implemented various scripts to re-queue the emails, but it was annoying that we couldn’t determine the cause.

Recently it started up again, and what’s odd is we have 7 identical web servers behind a load balancer (VMs that were all coped off the same image), and only one of them was experiencing the issue (Windows 2003 Server, CF8 32bit).

Well we finally figured it out – it was McAfee anti-virus. Once we added an exception to not monitor the ColdFusion directory, the problems went away.

Hope that helps if anyone encounters this.

5 Responses to “Exception occurred when setting up mail server parameters”

  1. We had a very similar problem a few years back where McAfee would basically take down our ColdFusion server(s) periodically. Had to really fight with our hosts to convince them that this was the case and resolve by putting directory and file type ignore rules in place. Having on-access scans running across an entire server seems to be a really bad idea. Perhaps better is to have it off by default and turned *on* for specific folders, if at all.

  2. Tariq Ahmed says:

    @Dominic: Totally. Ya I’m not a big fan of McAfee, tends to be resource intensive at times.

  3. This was very helpful, thank you! I am using Symantec, but the issue was the same. Once I disabled, it CF started sending emails again.

  4. George Murphy says:

    We are experiencing the same problem. Does this problem occur with the cfscript syntac of cfmail? I think I heard somewhere that his problem does not happen if you use the cfmail tag to send the mail. I am going to switch to tags and see if I get the same behavior?

  5. Tariq Ahmed says:

    As a follow up – we ended up just disabling scheduled scans. We found that it was hitting the disk so hard that sometimes it would prevent CF from accessing the mail spool, and then get into a state of funk.

    Ever since then we’ve been good.

Leave a Reply

Your email address will not be published. Required fields are marked *