It's all about the answers!

Ask a question

Why does my JTS show services hanging in MailerService.sendMessage()?


Alex Fitzpatrick (5583816) | asked Mar 11 '14, 1:18 p.m.
JAZZ DEVELOPER
If I look in the active services I frequently see a lot of calls to the MailerService which take a long time to complete.

Is this a problem and what could be causing this?


One answer



permanent link
Alex Fitzpatrick (5583816) | answered Mar 11 '14, 1:19 p.m.
JAZZ DEVELOPER
edited Jun 19 '14, 12:35 p.m.
 If MailService calls are visibly queuing up and taking several minutes to be processed then there is a potential problem since these calls could potentially prevent license requests for new client connections.

There are several possible causes of this including a bad SMTP configuration, however if emails are eventually sent then you should look the details of the waiting service calls and see if any of them include a call to SMTPTransport.isConnected.

If this code is frequently hit then you may be encountering a situation where JTS is trying to keep an SMTP connection open by sending NOOP messages which is known to interact with some firewall configurations designed to defeat denial of service attacks.

If this is the case there are two possible workarounds, one is to change the network configuration so that it no longer reacts to frequent NOOP messages. This approach however may not be approved by corporate IT standards.

The second workaround is to reduce reuse of the SMTP connection by setting "Transport Reuse Count" in the JTS mail configuration to 5(the default is 19). 

Your answer


Register or to post your answer.