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 CiviMember (Moderator: Deepak Srivastava) »
  • Massive errors in error_log and UpdateMembershipRecord.php
Pages: [1]

Author Topic: Massive errors in error_log and UpdateMembershipRecord.php  (Read 1517 times)

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Massive errors in error_log and UpdateMembershipRecord.php
November 12, 2009, 09:15:40 am
We had a previous issue with the UpdateMembershipRecord script which seemed to be fixed, but the memberships aren't updating and we're getting a lot of fatal errors now.

There doesn't seem to be much in these forums about the "Deadlock" error we're getting:
Code: [Select]
Updating ...

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: unknown error

    Return to home page.

Error Details:

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

    [c ode] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => DELETE FROM civicrm_activity  WHERE (  civicrm_activity.source_record_id = 848595 )  AND (  civicrm_activity.activity_type_id = 7 ) [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [type] => DB_Error
    [user_info] => DELETE FROM civicrm_activity  WHERE (  civicrm_activity.source_record_id = 848595 )  AND (  civicrm_activity.activity_type_id = 7 ) [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM civicrm_activity  WHERE (  civicrm_activity.source_record_id = 848595 )  AND (  civicrm_activity.activity_type_id = 7 ) [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]"]
)

And the error_log is giving this error periodically when we're trying to run the script:
Quote
PHP Notice:  Undefined index:  2 in /home/username/sitename.org/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php on line 330

In addition, the error_log is showing these errors for other users:
Quote
PHP Warning:  MySQL server has gone away\nquery: INSERT INTO watchdog\n    (uid, type, message, variables, severity, link, location, referer, hostname, timestamp)\n    VALUES\n    (1123, 'php', '%message in %file on line %line.', 'a:4:{s:6:\\"%error\\";s:12:\\"user warning\\";s:8:\\"%message\\";s:367:\\"MySQL server has gone away\\nquery: UPDATE sessions SET uid = 113, cache = 0, hostname = '23.128.31.111', session = 'CiviCRM|a:3:{s:4:\\\\"ufID\\\\";s:4:\\\\"1123\\\\";s:6:\\\\"userID\\\\";s:4:\\\\"1327\\\\";s:8:\\\\"ufUniqID\\\\";s:0:\\\\"\\\\";}', timestamp = 1258043931 WHERE sid = 'c59iqqf15ng50m7h81q5dep8k4'\\";s:5:\\"%file\\";s:69:\\"/home/username/sitename.org/includes/session.inc\\";s:5:\\"%line\\";i:68;}', 3, '', 'http://www.sitename.org/system/files/Ad in /home/username/sitename.org/includes/database.mysql.inc on line 128, referer: http://www.sitename.org/node/path

This is Drupal 6.14 and CiviCRM 3.0.2.  Any guidance would be greatly appreciated as nothing membership related is updating correctly. (Users are trying to re-subscribe and they get a whitescreen, then try again and get an error message...meanwhile they are billed twice... nightmares).
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Massive errors in error_log and UpdateMembershipRecord.php
November 12, 2009, 11:43:28 am

can you email me a copy of the DB (lobo at yahoo dot com)

i'll take a look at it and see if i can reproduce the issues

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Massive errors in error_log and UpdateMembershipRecord.php
November 12, 2009, 12:16:52 pm
Thanks, Lobo.

I realized that we moved this to a freshly installed server and the host didn't do much in the way of tweaking the default settings. They told me that "MySQL server has gone away" usually was related to faulty programming and they didn't offer to help any further. Luckily I stumbled upon this post in the Drupal forums, and then called back and had the host check their default MySQL settings, which were less than 10% of what this post recommended...

We've bumped it up and are now testing to see if that is what the issue was.

If we continue to have problems I may take you up on your generous offer.

Peace,
Laryn
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Massive errors in error_log and UpdateMembershipRecord.php
November 13, 2009, 08:55:37 am
Is there a page with recommended server configuration settings (MySQL specifically) for CiviCRM sites? The above changes seem to be helping but the logs are still showing "MySQL server has gone away" errors, although not nearly as often. I would like to tweak the settings for a CiviCRM/drupal server if there are particular recommendations so I can see if I can get rid of these errors altogether.
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Massive errors in error_log and UpdateMembershipRecord.php
November 13, 2009, 09:33:27 am

hey Laryn:

Once you have a good config for mysql settings, can you please post on wiki so others can benefit

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: Massive errors in error_log and UpdateMembershipRecord.php
November 17, 2009, 12:02:27 pm
I will post what we end up with, but I'm not a server expert. :)
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Massive errors in error_log and UpdateMembershipRecord.php

This forum was archived on 2017-11-26.