Switch from NOOP to RSET to avoid SMTP communication hanging

Technote (troubleshooting)


Problem(Abstract)

Latency is reported in delivery of email. Javacore files show slow execution of the following code stack:

3XMTHREADINFO "WorkManager.default : 1" J9VMThread:0x877FB100,j9thread_t:0x8B98EA34, java/lang/Thread:0xB4350B68, state:R, prio=5
3XMTHREADINFO1 (native thread ID:0x3802, native priority:0x5,native policy:UNKNOWN)
3XMTHREADINFO2 (native stack address range from:0x8473B000,to:0x8477C000, size:0x41000)
3XMTHREADINFO3 Java callstack:4XESTACKTRACE at java/net/SocketInputStream.socketRead0(Native Method)
4XESTACKTRACE at java/net/SocketInputStream.read(SocketInputStream.java:140(CompiledCode))
4XESTACKTRACE at com/sun/mail/util/TraceInputStream.read(TraceInputStream.java:97(Compiled Code))
4XESTACKTRACE at java/io/BufferedInputStream.fill(BufferedInputStream.java:229(Compiled Code))
4XESTACKTRACE at java/io/BufferedInputStream.read(BufferedInputStream.java:248(Compiled Code))
4XESTACKTRACE at com/sun/mail/util/LineInputStream.readLine(LineInputStream.java:75(Compiled Code))
4XESTACKTRACE at com/sun/mail/smtp/SMTPTransport.readServerResponse(SMTPTransport.java:1440(Compiled Code))
4XESTACKTRACE at com/sun/mail/smtp/SMTPTransport.isConnected(SMTPTransport.java:687(Compiled Code))
4XESTACKTRACE at com/ibm/commerce/messaging/adapters/jcaemail/JCAEmailManagedConnectionFactory.matchManagedConnections(JCAEmailManagedConnectionFactory.java:182(Compiled Code))
...

Cause

Starting with WebSphere Commerce V7.0.0.4, the isConnected() method was introduced which invokes the NOOP command to validate the SMTP connection. Some firewalls can be configured to slow down requests after a number of NOOP commands are received


Resolving the problem


Reconfigure the SMTP/Firewall configuration to allow for the NOOP command.

Alternatively, configure WebSphere Commerce to use RSET instead of NOOP, using these steps:
Adding JavaMail parameters to the WebSphere Commerce Environment


Add the following parameters to the JCAEmailConnectionRequestInfo.properties file:

mail.smtp.userset=true
mail.smtp.timeout=5000

Explanation:
mail.smtp.timeout
A socket I/O timeout value in milliseconds. Default is infinite.

mail.smtp.userset
If set to true, the RSET command is used instead of the NOOP command in the isConnected() method. In some cases, sendmail will respond slowly after many NOOP commands are issued. The use of RSET avoids this particular problem. Defaults to false.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere Commerce Enterprise
Messaging

Software version:

7.0.0.4, 7.0.0.5, 7.0.0.6, 7.0.0.7

Operating system(s):

AIX, IBM i, Linux, Solaris, Windows, i5/OS

Software edition:

Edition Independent

Reference #:

1635747

Modified date:

2013-08-22

Translate my page

Machine Translation

Content navigation