Sending large number of email notifications may cause some to go missing

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2016.x

Symptom

An error message similar to below may be seen in the log file:

Wed-13-Aug-2014 01:01:37 PM ERROR pool-1-thread-32 801027 : An exception occurred. Could not connect to SMTP host: *********, port: 25, response: 421 Wed-13-Aug-2014 01:01:37 PM ERROR pool-1-thread-32 801009 : Failed to send email. javax.mail.MessagingException: Could not connect to SMTP host: *********, port: 25, response: 421 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at COM.safe.fmeserver.notification.plugin.FMESubscriberEmailNotifier.run(FMESubscriberEmailNotifier.java:35) 

In addition to this error log, configured notifications may not be sent or received. This error indicates FME Server was not able to connect to the email system to send the email message (notification).

Cause

Email systems like Microsoft Exchange may limit the number of parallel connections that can be made from an application. In the case of FME Server, we allow 100 worker threads to start and therefore could try to make 100 connections to an email system to send email notifications. There has been at least one report where this issue was experienced when the Microsoft Exchange limit for parallel connections was 20.

This means that if a large number of email notifications are initiated by FME Server, many of the attempts to send emails will not even connect to the Exchange Server (or other email system) and the email will not get sent.

Resolution

It will be necessary to reduce the MAX_WORKER_THREADS to be the same or less than the number of permitted parallel connections by the email system.

1. Locate the file email.properties in the FME Server installation folder:

<FME Server Install Dir>/Server/config/subscribers/email.properties

2. Reduce the value of MAX_WORKER_THREADS, e.g. 20:

#MAX_WORKER_THREADS - The maximum number of worker threads
MAX_WORKER_THREADS=20

3. Save the file and restart FME Server.
Reducing this value only limits how fast the notifications can be sent in quick succession.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.