cancel
Showing results for 
Search instead for 
Did you mean: 

Major problem with smtp and reindexing

ebogaard
Champ on-the-rise
Champ on-the-rise
Yesterday Alfresco crashed on us. When investigating why, the logfile appeared to be enormous: >10GB. Checking the contents revealed that Alfresco was trying to send an email to a non-existing user (user was removed from the AD):

10:39:34,686 User:eripo ERROR [action.executer.MailActionExecuter] Failed to send email to [<USERNAME>]
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
   com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 User unknown

This entry appeared (I guess, but didn't count) thousands of times in the logfile.
Shouldn't there be a limit on retrying to send an email?

Even though this is a major problem, the biggest problem is getting rid of it:
Because of the many retries, at leas that's what I think, the transactional log has gron enormously. Where the last reindex counted 117.000 transactions and was completed in 8 minutes, this one counts 3.600.000. Only the first 10% took 7,5 hours!

When I extrapolate the time it should take to index 117K opposed to 3,6M, it should take less than 300 minutes. Why is this taking so locg, and, most importantly, how can I speed things up?
When I look at the use of resources, the CPU hardly has to do any work, only once in a while tomcat peaks, than mysql. Only the SAN is working quite hard and has read and written >1,5TB in these 7,5 hours.

Alfresco CE 3.4.b, Windows 2008 R2, Java 64bit, 2,5GB heap, MySQL on the same server as tomcat.
3 REPLIES 3

muralie39
Champ on-the-rise
Champ on-the-rise
catch (Throwable e)
      {
          // don't stop the action but let admins know email is not getting sent
logger.error("Failed to send email to " + (String JavaDoc)ruleAction.getParameterValue(PARAM_TO), e);
      }

ebogaard
Champ on-the-rise
Champ on-the-rise
Update: Several days ago I posted a bug in Jira (https://issues.alfresco.com/jira/browse/ALF-6550) and Alfresco is going to fix the SMTP bug (where the bug is: "no limit on number of retries") in 3.4d and 3.4.1. So that shouldn't be a problem anymore.

But because of this bug, I'm having a bigger problem. The database has grown from ~200MB to almost 500MB. The number of transactions has gone up from about 150K to 3,6M, increasing the time to reindex from ~15 minutes to 38 hours!
Anybody knows a way to safely (!) clean the databse of unnecessary transactions? I suspect the enormous number of retries on sending the mail (which was triggered by a rule in a Space) has impacted the DB, so if anyone knows where to find these transactions and how to clean it up, it would be greatly appreciated.

ebogaard
Champ on-the-rise
Champ on-the-rise
Last week, the automatic cleaning jobs reduced te db size to ~360MB (1,9M transactions), which is a good thing. Hoped the cleaning jobs this week would reduce the size and useless transactions even more, but no cigar. Just the ususal few MB's. Anyone a suggestion?