Scott_Owens

Increasing the number of times PAM will try to connect to the mail server.

Discussion created by Scott_Owens Employee on Apr 18, 2013
CA Process Automation Tech Tip by Scott Owens, Sr. Support Engineer, April 18th 2013

By default PAM will try to connect to your mail server 6 times. Once every 30 seconds. If the mail server is down (for maintenance or other), PAM will quit trying to connect after the 6 tries. In the c2o.log you would see the following:

ERROR [com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService] [ service thread] Connection to mail server failed 6 time, polling mail server is stopped. Update trigger properties after fixing the problem to resume trigger functionality.

If you go into the mail trigger and make an arbitrary change (changed the interval) and save. This will bring the PAM mail trigger back up as long as you can connect to your mail server.

Starting in 3.1 SP1 CP12 HF01 you can override the max number of times that PAM attempts to connect to the mail server while initializing the connection or while polling for new emails after the initial connection was established. Once the max number of retries is reached, then the user is
forced to manually modify the mail trigger properties in order to restart the trigger. This can not be set to infinite as this could cause other issues.

The oasisconfig.properties variable that overrides the max number of retries is the following:

pam.trigger.imap.connection.retry.count

By default, this variable does not appear in the oasisconfig.properties file. You must add it manually. All attempts are 30 secs apart from each
other.

If you set this value a high number like 300, then PAM will attempt to connect to the mail server every 30 seconds for 300 times. You can specify a higher number to cover more days.

You can follow PAM’s attempts to connect to the mail server in the logs as follows:
jvm 1 | 2013-04-16 14:44:49,475 WARN [com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService] Connection to mail server failed, current error count is 10, maximum allowed is 300. Waiting 30000 ms before trying to reconnect

10 is the current number of retries
300 is the number of maximum retries (as specified by pam.trigger.imap.connection.retry.count)
30000 is the number of ms between the retries (30 secs)

Outcomes