Send emails from a distributed environment

We have multiple application servers with the same custom.properties setting - to use the middle server for sending email. Lately, (as more usage occurs on the platform) we have had complaints about email notifications not being sent but after we restart the node it works. I am wondering if maybe this one server can no longer handle the load for all but I don't have any test environments set up in the same manner to play around with the setting. Has anyone tinkered with having each app server set to use itself as the MAIL_SERVER (i.e. serverA has MAIL_SERVER_AND_PORT set to serverA, serverB has MAIL_SERVER_AND_PORT set to serverB?

I see this in my logs for today's occurrence:
2016-10-20 16:42:09,793 [Appian Work Item - 295831 - ProcessExec06 : SendNotificationRequest] WARN com.appiancorp.ap2.service.PortalNotificationServiceJavaImpl - A notification broadcast has been prevented b...

OriginalPostID-241929

  Discussion posts and replies are publicly visible

Parents
  • ...nsport.java:1950)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
    at javax.mail.Service.connect(Service.java:295)
    at com.appiancorp.ap2.mail.Mail.sendMessage(Mail.java:328)
    at com.appiancorp.ap2.mail.Mail.sendMessage(Mail.java:220)
    at com.appiancorp.ap2.mail.Emailer.send(Emailer.java:124)
    at com.appiancorp.ap2.mail.Emailer.send(Emailer.java:119)
    at com.appiancorp.process.runtime.activities.SendEmailActivity.execute(SendEmailActivity.java:371)...
    Caused by: java.net.SocketException: Connection reset...

    Each application server has these settings in custom.properties:
    conf.suite.MAIL_SCHEME=http
    conf.suite.MAIL_SERVER_AND_PORT=ValidServerB:8080
    conf.mailhandler.ntf_sndr_addr=noreply@ValidDomain.com
    conf.mailhandler.email.domain=ValidDomain.com
    conf.mailhandler.mail.smtp.host=mailhost....

    Thanks.
Reply
  • ...nsport.java:1950)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
    at javax.mail.Service.connect(Service.java:295)
    at com.appiancorp.ap2.mail.Mail.sendMessage(Mail.java:328)
    at com.appiancorp.ap2.mail.Mail.sendMessage(Mail.java:220)
    at com.appiancorp.ap2.mail.Emailer.send(Emailer.java:124)
    at com.appiancorp.ap2.mail.Emailer.send(Emailer.java:119)
    at com.appiancorp.process.runtime.activities.SendEmailActivity.execute(SendEmailActivity.java:371)...
    Caused by: java.net.SocketException: Connection reset...

    Each application server has these settings in custom.properties:
    conf.suite.MAIL_SCHEME=http
    conf.suite.MAIL_SERVER_AND_PORT=ValidServerB:8080
    conf.mailhandler.ntf_sndr_addr=noreply@ValidDomain.com
    conf.mailhandler.email.domain=ValidDomain.com
    conf.mailhandler.mail.smtp.host=mailhost....

    Thanks.
Children
No Data