Hi everyone,

We are facing slow delivery of notification emails from user
application recently.
This is 3.7.0 Patch D, and we have switched over to a new email server.
Emails can take from ~10 minutes up to (sometimes) several hours to be
delivered to the newly configured email server.

While troubleshooting this, we enabled trace logging for
com.novell.soa.notification.
Then we noticed in the logs that userapp tries to reconnect to the
email server every five minutes (300000 ms):
----
2012-01-17 14:36:58,165 INFO [STDOUT] (Timer-2) TRACE
[com.novell.soa.notification.impl.MailEngine:run] Trying to (re)
establish mailserver connection. Will try this every 300000 ms
2012-01-17 14:36:58,189 INFO [STDOUT] (NOTIFICATION THREAD) TRACE
[com.novell.soa.notification.impl.NotificationThrea d:run] QUEUE EMPTY
WAITING...
----

Indeed, the new relay mailserver has a connection timeout set (default
45 seconds, this is a Barracuda appliance). The old mailserver did not
have a timeout configured.
What we have noticed also, is that the JMS message queue tries to
deliver the message at first, then afterwards the mail queue is
declared empty while the JMS does still have the message in queue
(somewhere).
----
2012-01-17 14:34:42,164 INFO [STDOUT] (JMSSubscriber) TRACE
[com.novell.soa.notification.impl.jms.JMSSubscriber :handleMessage] jms
subscriber received:wH9wXBl4/hp2OxXwJkEDBQ==19TqyA
<snip>
UsSVZ1g==
----
2012-01-17 14:46:58,165 INFO [STDOUT] (Timer-2) TRACE
[com.novell.soa.notification.impl.MailEngine:run] Trying to (re)
establish mailserver connection. Will try this every 300000 ms
2012-01-17 14:46:58,195 INFO [STDOUT] (NOTIFICATION THREAD) TRACE
[com.novell.soa.notification.impl.NotificationThrea d:run] QUEUE EMPTY
WAITING...
2012-01-17 14:46:58,205 INFO [STDOUT] (JMSSubscriber) TRACE
[com.novell.soa.notification.impl.jms.JMSSubscriber :handleMessage] jms
subscriber received:wH9wXBl4/hp2OxXwJkEDBQ==19TqyA
<snip>
UsSVZ1g==
----

Often, several connection cycles to the email server pass without the
message being delivered. This causes the long delays.
It would seem that the JMS polling cycle does not correspond with the
email delivery cycle. Is that correct? Can anyone shed some light on
this?
Also, can we configure userapp to connect to the mailserver on
delivery, instead of trying to keep a connection open?

Many thanks,

Mark van Reijn

--
i d f o c u s
Identity | Access | Security
http://www.idfocus.nl