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 CiviContribute (Moderator: Donald Lobo) »
  • Contribution multiple transactions occurred within the same minute
Pages: [1]

Author Topic: Contribution multiple transactions occurred within the same minute  (Read 933 times)

eteflamingo

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.1
  • CMS version: drupal
  • MySQL version: 5
  • PHP version: 5.3
Contribution multiple transactions occurred within the same minute
February 08, 2012, 06:43:55 am
Hi everyone,

Here's the issue every time a person donate it throws this error:
Error Details
Database Error Code: Deadlock found when trying to get lock; try restarting transaction, 1213
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] =>   
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(MINUTE, cache_date, 20120208042148) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [type] => DB_Error
    [user_info] =>   
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(MINUTE, cache_date, 20120208042148) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info="
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(MINUTE, cache_date, 20120208042148) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]"]
)

I've talked to our technical support and they said this could be resolved by modifying the time stamp values used in the column 'cache_date' and by the update query 'WHERE TIMESTAMPDIFF(MINUTE, cache_date, 20120208042148)' to use a more precise value such as SECONDS or MICROSECONDS, is this true ? it is possible to change it and won't effect any data if so where I can go change that and what I should put instead.

Thanks  :)

eteflamingo

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.1
  • CMS version: drupal
  • MySQL version: 5
  • PHP version: 5.3
Re: Contribution multiple transactions occurred within the same minute
February 08, 2012, 07:18:43 am
I think I found the file is under CRM/Contact/BAO/GroupContactCache.php and one more think I see the database field cache_date is datetime and it won't store milliseconds so we should put the seconds instead of minute. Please advise
Thank you 

eteflamingo

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.1
  • CMS version: drupal
  • MySQL version: 5
  • PHP version: 5.3
Re: Contribution multiple transactions occurred within the same minute
February 08, 2012, 08:23:40 am
I change it to second and it didn't work please advise.

Database Error Code: Deadlock found when trying to get lock; try restarting transaction, 1213
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] =>
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(SECOND, cache_date, 20120208161221) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [type] => DB_Error
    [user_info] =>
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(SECOND, cache_date, 20120208161221) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]
    [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info="
UPDATE civicrm_group g
SET    cache_date = null
WHERE  TIMESTAMPDIFF(SECOND, cache_date, 20120208161221) >= 0
 [nativecode=1213 ** Deadlock found when trying to get lock; try restarting transaction]"]
)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribution multiple transactions occurred within the same minute

This forum was archived on 2017-11-26.