CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Occasional CRM_Core_Error during CiviMail mailing
Pages: [1]

Author Topic: Occasional CRM_Core_Error during CiviMail mailing  (Read 1884 times)

cray146

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Occasional CRM_Core_Error during CiviMail mailing
December 11, 2009, 08:11:50 am
Hi,

We're using CiviMail for all our bulk mailing for a number of months now. We're very happy with the performance and the features the module offers. There is one problem though. Once in a while, a mailing stops working (and blocks the remaining scheduled jobs too).

When the system is in that state and i run the civimail cron job from the browser i get:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_activity (source_contact_id , source_record_id , activity_type_id , subject , activity_date_time , status_id ) VALUES ( 145698 ,  241 ,  3 , 'Subject of the mailing' ,  20091209155307 ,  2 )  [nativecode=1205 ** Lock wait timeout exceeded; try restarting transaction]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_activity (source_contact_id , source_record_id , activity_type_id , subject , activity_date_time , status_id ) VALUES ( 145698 ,  241 ,  3 , 'Subject of the mailing' ,  20091209155307 ,  2 )  [nativecode=1205 ** Lock wait timeout exceeded; try restarting transaction]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_activity (source_contact_id , source_record_id , activity_type_id , subject , activity_date_time , status_id ) VALUES ( 145698 ,  241 ,  3 , 'Subject of the mailing' ,  20091209155307 ,  2 )  [nativecode=1205 ** Lock wait timeout exceeded; try restarting transaction]"]
)

Apparently, the  "Lock wait timeout exceeded; try restarting transaction" error indicates a InnoDB transaction that cannot obtain a row lock. What I've been doing until now is to restart MySQL server every time this happens. After the restart, the mailing resumes and everything works normal.

The problem occurs intermittent and does not seem to be related to the size of the mailing. Mailings to more than 50,000 contacts may succeed, while a mailing to 5000 contacts hits the error. I've been experimenting CiviMail configuration settings (civicrm/admin/mail?reset=1) without any luck.
 
I'm in doubt on what to do next. Any advice on what causes this problem and how it can be solved?

We're running CiviCRM 2.2.8 on drupal with MySQL 5.0.51a and Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3.

Thanks

Chris


Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Occasional CRM_Core_Error during CiviMail mailing
December 11, 2009, 10:42:39 am
Quote from: cray146 on December 11, 2009, 08:11:50 am
The problem occurs intermittent and does not seem to be related to the size of the mailing. Mailings to more than 50,000 contacts may succeed, while a mailing to 5000 contacts hits the error.

If it’s not related to the size of the mailing, is there a chance that this is related to the time since the last MySQL restart? (As in, maybe there’s a global MySQL transaction lock counter that overflows at some point…)

Have you tried with smaller mailing batches (sent more often)?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

cray146

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: Occasional CRM_Core_Error during CiviMail mailing
December 12, 2009, 03:56:32 am
I've been experimenting with the mailer settings since the error occured for the first time. Mainly focussing on different combinations of mail spool period and mail spool limit until i found out these seetings might not be implemented (see: http://forum.civicrm.org/index.php?topic=9499.0). Mailer batch limit was unlimited at first but i have been decreasing the parameter every time the error occured. Currently it is set to 1000. Civimail cronjob runs every 5 minutes.

I'll see if i can find a relation between the time or the number of mails sent since the last MySQL restart. I'll keep you posted.

Thanks for the help.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Occasional CRM_Core_Error during CiviMail mailing

This forum was archived on 2017-11-26.