Messages with Large Numbers of Recipients are Slowing Jobs

  • 7019085
  • 28-Jan-2016
  • 07-Aug-2017

Environment


Retain 3.x/4.x

Situation


Archive jobs are going much slower and we are finding messages in the logs that show very large numbers of recipients.

Resolution

When Retain archives a message it stores just one copy of the message to disk and sets pointers to that message in the database for all the recipients. Generally, this does not take long as most messages only have a few recipients. However, it becomes time consuming when Retain has to update all the users in the database when a message is sent to all mailboxes on the email system. Especially when there are 15k of them.

We can change the number of recipients that Retain updates, the remainder being saved to an xml file that is attached to the message in Retain. On a customer's Retain system the database was updating about 25 users/second. Retain used to default to 250 recipients but now it is unlimited.

  1. Stop tomcat
  2. For each worker:
    1. Go into/opt/beginfinite/retain/RetainWorker[N]/WEB-INF/classes/config/attachment.properties
    2. Change "max.recipients=" to something other than 0 (which is unlimited)  
  3. Start tomcat
  4. Start a job.

NOTE: Once the max.recipients setting is enabled, the Retain Worker log will log all archived message items that exceed the maximum value with the following entry in the Retain Worker log:

WARN  [RTWQuartzScheduler_Archive_Worker-5] com.gwava.caapi.Archiver: Truncated list of recipients, per your settings

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 2714.