Configure timeouts for SMTP connections
Configure timeouts for SMTP connections by indicating specific parameters. By not configuring timeouts, the thread can wait indefinitely for an SMTP server to respond, leading to a hang in the WebSphere Commerce JVM.
Procedure
- Create a file named JCAEmailConnectionRequestInfo.properties in the WAS_installdir/lib directory.
- Include the following parameters in the JCAEmailConnectionRequestInfo.properties file (make sure that we select values that are appropriate for our configuration):
- mail.smtp.connectiontimeout int Socket connection timeout value in milliseconds. Default is infinite timeout. Recommended value is 180000 (180 seconds) or bigger.
Note: The connection timeout must be longer than the unused timeout on the WebSphere Application Server connection pool.
- mail.smtp.timeout int Socket I/O timeout value in milliseconds. Default is infinite timeout. Recommended value is 180000 (180 seconds) or bigger.
For a list of possible JavaMail configuration parameters, see the package description of com.sun.mail.smtp: Package com.sun.mail.smtp
- Restart the WebSphere Commerce JVM for the changes to take effect.
Related tasks
Manage message types
Configure outbound email notification messages
Configure email activity accounts
Configure validation for No Operation (NOOP) messages
Configure the SMTP connection pool properties