Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
596 views
in Q2A Core by
Question2Answer query failed:

UPDATE qa_words AS x, (SELECT qa_words.wordid, COUNT(qa_contentwords.wordid) AS contentcount FROM qa_words LEFT JOIN qa_contentwords ON qa_contentwords.wordid=qa_words.wordid WHERE qa_words.wordid IN (1386,1001,1037,4592,151348,3789,376,151349,4194,71568,1160,4479,75622,18424,8503,9111,151350,1572,151351,8817,781,5939,151352,20792,78300,41,17,66338,2108,151353,43728,6812,9604,29918,91893,106098,7263,78693,172,478,1506,3611,30468,18852,9479,12,756,347,81541,69,70,116189,1552,136053,1176,11219,272,3330,112,113,4199,33479,32,9433,8362,903,5551,1150,11730,492,9039,898,2797,132,4409,6972,4909,21,1616,151354,238,196,2408,75707,6833,493,80,1030,48903,3640,81993,48716,2405,1504,2993,401,28477,144258,3222,151355,1585,151356,141340,23277,1146,1009,385,9114,5480,1100,8814,122468,23,151357,13863,82757,31578,771,1182,139,1531,590,19653,14326,12895,1694,3150,713,4523,1644,1767,6254,151358,36358,2533,7266,1,28644,5833,802,150813,7220,62437,15569,7238,5553,158,5268,82559,219,562,15471,480,1590,13458,81333,6747,85389,3543,1515,48172,151359,36359,311,4179,73,7015,469,59,4147,24757,73035,1025,6765,7984,4545,1200,1245,151360,24443,928,7721,4153,80436,25271,151361,5137,21227,3982,825,3728,4977,48721,994,167,946,38358,112613,173,1895,151362,719,6759,541,151363,422,7908,13360,2164,17824,62,1776,1165,3006,143385,30467,220,20537,5557,244,50687,519,6929,869,25020,5543,1226,39051,4442,25528,2833,78965,80748,289,3352,47,151364,151365,28736,2742,118105,29504,304,83163,151366,882,12674,21169,5558,4380,38,107,1062,81,27154,1053,276,1629,21432,1566,1567,22765,3961,1905,3760,4935,226,10290,1185,1595,9714,12518,56,2268,18791,6204,9258,1014,83700,136429,154,19738,348,15433,1406,332,3253,5112,3210,927,93136,2737,3480,8332,3496,92898,151367,1600,6536,5332,6265,21813,2034,4181,944,4536,15068,533,525,1975,8693,75619,5705,6321,37112,11767,9010,6970,4537,4168,3409,48731,1131,1847,10532,5236,931,1135,11519,3305,8970,11941,3000) GROUP BY wordid) AS a SET x.contentcount=a.contentcount WHERE x.wordid=a.wordid

Error 1213: Deadlock found when trying to get lock; try restarting transaction

1 Answer

0 votes
by
Yes, apparently this can occasionally happen with InnoDB tables in MySQL, and I'll see if I can make Q2A 1.5 deal with it better.

Are you seeing this with any regularity or was it just a once off?
by
by
I see this 3-4 times per day, especially, when traffic is high and when more than one person asking questions at the same time.
...