Odoo Help


Server error when we do mass mailing with 3000 contacts.

on 2/5/15, 9:19 AM 1,538 views

Can someone help on below issue ?
When we send the Mail for 3000 customer then system is successfully send only 24 Customer and rest are fail, then system is showing Server Error which is mention below:

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/openerp/http.py", line 518, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/openerp/http.py", line 539, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/openerp/http.py", line 295, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/openerp/http.py", line 292, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/openerp/http.py", line 755, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/openerp/http.py", line 388, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 953, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/marketing_campaign/marketing_campaign.py", line 308, in synchroniz
    self.process_segment(cr, uid, ids)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/marketing_campaign/marketing_campaign.py", line 359, in process_segment
    Workitems.process_all(cr, uid, list(campaigns), context=context)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/marketing_campaign/marketing_campaign.py", line 765, in process_all
    self.process(cr, uid, workitem_ids, context=context)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/marketing_campaign/marketing_campaign.py", line 745, in process
    self._process_one(cr, uid, wi, context=context)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/marketing_campaign/marketing_campaign.py", line 740, in _process_one
    workitem.write({'state': 'exception', 'error_msg': tb})
  File "/opt/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/models.py", line 3700, in write
  File "/opt/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 552, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/opt/odoo/openerp/models.py", line 3811, in _write
    cr.execute(query, params + (sub_ids,))
  File "/opt/odoo/openerp/sql_db.py", line 158, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/odoo/openerp/sql_db.py", line 234, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Thanks in advance,



You enable log_level = debug_sql in openerp-server.conf and show what is in the log file (when error).

on 2/5/15, 9:56 AM



| 5 3 8
Pondicherry, India
On 2/6/15, 2:52 AM

hi Nimesh,

you can set the limit for the mail in addons/mail/mail_mail.py .

In the file there is a method called def process_email_queue().

you can set the limitby use the below code changes in the method.

    def process_email_queue(self, cr, uid, ids=None, context=None):
        """Send immediately queued messages, committing after each
           message is sent - this is not transactional and should
           not be called during another transaction!

           :param list ids: optional list of emails ids to send. If passed
                            no search is performed, and these ids are used
           :param dict context: if a 'filters' key is present in context,
                                this value will be used as an additional
                                filter to further restrict the outgoing
                                messages to send (by default all 'outgoing'
                                messages are sent).
        if context is None:
            context = {}
        if not ids:
            filters = ['&', ('state', '=', 'outgoing'), ('type', '=', 'email')]
            if 'filters' in context:
            ids = self.search(cr, uid, filters, context=context,limit=500)
        res = None
            # Force auto-commit - this is meant to be called by
            # the scheduler, and we can't allow rolling back the status
            # of previously sent emails!
            res = self.send(cr, uid, ids, auto_commit=True, context=context)
        except Exception:
            _logger.exception("Failed processing mail queue")
        return res

this may help you

Hello Vasanth, Thanks for you help. But, When we run the marketing Campaign for 3000 users then system is send the mail for 115-130 customer successfully and Rest customer are fail, then system is showing the below Error is Again with new one Error "XMlHttpRequestError. Thanks, Nimesh.

on 2/6/15, 7:26 AM

i think your server was stopped during a particular time.please check out is there any time-out process going on your server

on 2/6/15, 7:46 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 2/5/15, 9:19 AM
Seen: 1538 times
Last updated: 3/16/15, 8:10 AM