Our site is growing in traffic and this error is happening more and more as users save their nodes. We are using the locations module to simply allow people to put in their zipcodes.
Thoughts on why this could be happening? There is another thread here related to the same error on the node table. #937284: DEADLOCK errors on MergeQuery INSERT due to InnoDB gap locking when condition in SELECT ... FOR UPDATE results in 0 rows
PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO {location_instance} (nid, vid, uid, genid, lid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 31451 [:db_insert_placeholder_1] => 31451 [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => cck:field_location:31451 [:db_insert_placeholder_4] => 25092 ) in location_save_locations() (line 974 of /var/www/cityposted.com/httpdocs/sites/all/modules/location/location.module).
Setting to critical - same as other thread.
Comments
Comment #1
podarok#1764060: Register cache_location table with Drupal cache hook to enable cache cleanup fixed
You should check this in latest alpha release
Comment #1.0
podarokUpdated issue summary.
Comment #2
jkingsnorth commentedThis was fixed =]
Comment #3
firewaller commentedI'm getting the following on 7.x-3.7:
PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO {location_instance} (nid, vid, uid, genid, lid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => 22016 [:db_insert_placeholder_3] => cck:field_location:22016 [:db_insert_placeholder_4] => 17991 ) in location_save_locations() (line 1132 of sites/all/modules/location/location.module).