Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Mass-mailing only capable of sending to around 350 addresses

By
JJ
on 3/31/16, 5:07 AM 371 views

I'm running a community edition of Odoo 9, with the mass-mailing app installed and support for campaigns. If the mailinglist I use contains around 400 addresses, the mailing is not being send (not even when I repeatedly manually start the automated task of processing the mass-mailing queue). If the mailinglist is around 300-350 addresses everything works fine.

Anyone got any idea what could be the matter? Is there some other setting i'm missing? Or could it have something to do with the max resources of the worker-processes? (My settings: workers=5, limit_memory_hard = 2684354560, limit_memory_soft = 1147483648, limit_request = 4000, limit_time_cpu = 60, limit_time_real = 120)

Thanks a bunch!

How often does the automated task go off? Could it be that the scheduler isn't done with processing / sending out the e-mails before it starts again?

Yenthe
on 3/31/16, 5:18 AM

If starting the queue task means that a mailing that is in processing is restarted, then this could be the problem. As I have shortened the interval and was repeatedly restarting the task manually (with me having no patients). Only way to figure this out is by trying next month, when the next mailing is due. I will update by then. Thanks for this suggestion Yenthe! Do you have any Idea how long the processing of 3K mail-addresses should take? (Its running on a 2core Digital Ocean instance)

JJ
on 3/31/16, 9:37 AM
0
JJ
On 5/29/16, 7:13 PM

Apparently, odoo ran into the cpu time limit while generating the emails.

The log file states about 200 lines of 

openerp.tools.translate: translation went wrong for "'read more'", skipped

followed by

ERROR ? openerp.service.server: Worker (26558) timeout", "ERROR openerp.addons.base.ir.ir_cron: Call of self.pool.get('mail.mass_mailing')._process_mass_mailing_queue(cr, uid, *()) failed in Job 6  
Exception: CPU time limit exceeded.

INFO openerp.service.server: Worker (23346) CPU time limit (60) reached.

My limit_cpu_time was set to 60, I've changed it to 600. That seems to have been the problem. Now the system is sending out 500 emails every time the process_mass_mail_queue action is triggered.

It finishes sending the 500 emails within around 3-4 mins after I manually start the action.

Although mails are being delivered, it now logs the following error sequence:

ERROR openerp.addons.mail.models.mail_mail: failed sending mail (id: 289300) 

ERROR openerp.addons.base.ir.ir_cron: Call of self.pool.get('mail.mass_mailing')._process_mass_mailing_queue(cr, uid, *()) failed in Job 6 
TransactionRollbackError: could not serialize access due to concurrent update

ERROR openerp.addons.mail.models.mail_mail: Failed processing mail queue 
MissingError: (u'One of the records you are trying to modify has already been deleted (Document type: Outgoing Mails).', None)

And this is followed by

DEBUG openerp.addons.base.ir.ir_cron: 24.988s (mail.mail, process_email_queue)

So it might be that the automatic trigger of the mail queue process interferes with the mass mail process.

After setting the interval of the mail queue process to 20 mins instead of 2 mins, so it won't be triggered during the mass mail process, then the mass mail process runs without any errors occurring.

However, after counting the amount of "successfully sent" statements in the log file, I can conclude that the last error does not cause any of the 500 emails to drop.

So for now I conclude that for the mass mail to work (for a lager number of recipients) you will need to make sure that there is sufficient cpu time for the process

Also, if you don't want any errors occurring, make sure that:

  • The mass mail process isn't retriggered while it's running

  • The mail queue process isn't triggered while the mass mail process is running

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/31/16, 5:07 AM
Seen: 371 times
Last updated: 5/29/16, 7:13 PM