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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Dead Lock using the Contact API to import contacts
Pages: [1]

Author Topic: Dead Lock using the Contact API to import contacts  (Read 1031 times)

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Dead Lock using the Contact API to import contacts
June 07, 2010, 04:04:02 pm
Interesting thing I discovered,

I was importing a file into CiviCRM, in the process I went to the contribution page to make a donation, at the confirmation page once I hit submit I received a dead lock fatal error for creating contact.


I don't understand why this would happen because it is unlikely a database table lock (InnoDB uses row lock). So I guess it must have something to do with CiviCRM locking mechanisms.



Thanks


Chang



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: Dead Lock using the Contact API to import contacts
June 07, 2010, 04:28:44 pm

We dont use locks within CiviCRM (we use transactions for a long set of operations). the only explicit locking is done for civimail sends

what was your exact error and did that error give any additional details?

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Dead Lock using the Contact API to import contacts
June 08, 2010, 06:42:45 pm
I hit fatal deadlock errors in another situation - this was the multisite ACL hook where we had a circular group reference . Is it possible you could have hit a circular reference in some way?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Dead Lock using the Contact API to import contacts
June 08, 2010, 07:14:56 pm
Lobo: I will provide the error and the stage environment shortly.

But the case was that contact API was being called (during a large import process) and I was making a contribution not logged in the CMS and my guess is that CiviCRM has to create another DAO contact object and insert it into the database therefore causing the deadlock.

Please correct me if I'm wrong


Chang

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Dead Lock using the Contact API to import contacts

This forum was archived on 2017-11-26.