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 Drupal Modules (Moderator: Donald Lobo) »
  • backup_migrate - memory error on log_civicrm_preferences
Pages: [1]

Author Topic: backup_migrate - memory error on log_civicrm_preferences  (Read 949 times)

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
backup_migrate - memory error on log_civicrm_preferences
January 24, 2013, 06:42:39 pm
A CiviCRM site that has been running a couple of years was recently moved to a new host.  Things were going fine until cron stopped working and the Civi database was not getting backed up - actually neither database was getting backed up.

It was getting this error message from drush and something similar from manually running backup_migrate.

Code: [Select]
mysqli_query(): (HY000/2008): MySQL client ran out of memory database.mysqli.inc:114 [warning]
MySQL client ran out of memory 
query: SELECT * FROM `log_civicrm_preferences` database.mysqli.inc:134
Lost connection to MySQL server during query                                         [warning]
query: SHOW CREATE TABLE `log_civicrm_preferences_date` database.mysqli.inc:134
MySQL server has gone away   
query: SELECT * FROM `log_civicrm_preferences_date` database.mysqli.inc:134
MySQL server has gone away                                                           [warning]
query: SHOW CREATE TABLE `log_civicrm_premiums` database.mysqli.inc:134
MySQL server has gone away                                                           [warning]
query: SELECT * FROM `log_civicrm_premiums` database.mysqli.inc:134
MySQL server has gone away                                                           [warning]
. . .

It turned out that log_civicrm_preferences had grown to 320,000+ rows and backup_migrate was doing a Select * from that table and running out of memory.   

I do not understand why backup_migrate was that big.  Viewing the table in phpmyadmin revealed that there were 4000 log_conn_id values  -- if that sheds any light on the problem.

I thought to truncate the table - but since it uses the ARCHIVE engine I could not do that so I ran:
         show create table log_civicrm_preferences

to get the structure and then dropped the entire table, and recreated it with the results of show create table.

That seems to have solved the backup_migrate problem.  I hope this has not broken something deeper.



noah

  • I’m new here
  • *
  • Posts: 18
  • Karma: 4
Re: backup_migrate - memory error on log_civicrm_preferences
January 30, 2014, 03:15:33 pm
Hi, I just recently encountered the same problem. How has this solution worked out for you, long-term?

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Re: backup_migrate - memory error on log_civicrm_preferences
March 31, 2014, 11:38:30 am
This problem has not re-occurred. I am thinking when cron got working again that served to prune the table in some way.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • backup_migrate - memory error on log_civicrm_preferences

This forum was archived on 2017-11-26.