Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17159

deadlock on insert into civicrm_contact table

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.6.8
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      User was attempting to insert contact from browser while server was running other currently unspecified heavy load (probably large import). Temporary work-around was to try again. So far have not replicated the error, and am logging this issue in case it recurs for others.

      Aug 27 19:27:53 [info] $Fatal Error Details = Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , nick_name , legal_name , preferred_communication_method , preferred_language , preferred_mail_format , hash , source , communication_style_id , email_greeting_id , email_greeting_custom , postal_greeting_id , postal_greeting_custom , addressee_id , addressee_custom , organization_name , sic_code ) VALUES ('Organization' , '^AFood_Service_Operator^A' , 0 , 0 , 0 , 0 , 0 , 0 , '88035' , 'Atikokan Hotel' , 'Atikokan Hotel' , NULL , NULL , '' , 'en_US' , 'Both' , '01c4523dbb9ec267058369a37fe723eb' , NULL , 1 , NULL , NULL , NULL , NULL , 3 , NULL , 'Atikokan Hotel' , NULL ) [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , nick_name , legal_name , preferred_communication_method , preferred_language , preferred_mail_format , hash , source , communication_style_id , email_greeting_id , email_greeting_custom , postal_greeting_id , postal_greeting_custom , addressee_id , addressee_custom , organization_name , sic_code ) VALUES ('Organization' , '^AFood_Service_Operator^A' , 0 , 0 , 0 , 0 , 0 , 0 , '88035' , 'Atikokan Hotel' , 'Atikokan Hotel' , NULL , NULL , '' , 'en_US' , 'Both' , '01c4523dbb9ec267058369a37fe723eb' , NULL , 1 , NULL , NULL , NULL , NULL , 3 , NULL , 'Atikokan Hotel' , NULL ) [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="INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , nick_name , legal_name , preferred_communication_method , preferred_language , preferred_mail_format , hash , source , communication_style_id , email_greeting_id , email_greeting_custom , postal_greeting_id , postal_greeting_custom , addressee_id , addressee_custom , organization_name , sic_code ) VALUES ('Organization' , '^AFood_Service_Operator^A' , 0 , 0 , 0 , 0 , 0 , 0 , '88035' , 'Atikokan Hotel' , 'Atikokan Hotel' , NULL , NULL , '' , 'en_US' , 'Both' , '01c4523dbb9ec267058369a37fe723eb' , NULL , 1 , NULL , NULL , NULL , NULL , 3 , NULL , 'Atikokan Hotel' , NULL ) [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]"]
      )

      Aug 27 19:27:53 [info] $backTrace = #0 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...")
      #4 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...")
      #5 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...", "DB_Error", TRUE)
      #6 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1213 ** Deadlock found when trying to get lock; try restarting transaction")
      #7 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
      #8 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...")
      #9 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2442): DB_common->query("INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...")
      #10 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_contact (contact_type , contact_sub_type , do_not_email ,...")
      #11 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(450): DB_DataObject->insert()
      #12 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(230): CRM_Core_DAO->save()
      #13 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(328): CRM_Contact_BAO_Contact::add((Array:53))
      #14 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Contact.php(982): CRM_Contact_BAO_Contact::create((Array:53), TRUE, FALSE, TRUE)
      #15 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(345): CRM_Contact_Form_Contact->postProcess()
      #16 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(166): CRM_Core_Form->mainProcess()
      #17 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(133): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contact_Form_Contact), "upload")
      #18 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contact_Form_Contact), "upload")
      #19 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "upload")
      #20 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("upload")
      #21 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
      #22 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
      #23 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
      #24 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
      #25 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-content/plugins/civicrm/civicrm.php(1189): CRM_Core_Invoke::invoke((Array:3))
      #26 [internal function](): CiviCRM_For_WordPress->invoke("")
      #27 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-includes/plugin.php(496): call_user_func_array((Array:2), (Array:1))
      #28 /home/24074-14898.cloudwaysapps.com/qnwmfhbcjk/public_html/wp-admin/admin.php(226): do_action("toplevel_page_CiviCRM")
      #29

      {main}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: