Reply to thread

XF\Db\DeadlockException: MySQL query error [1213]: Deadlock found when trying to get lock; try restarting transaction

src/XF/Db/AbstractStatement.php:217


[code]

            UPDATE (

                SELECT content_id FROM xf_reaction_content

                WHERE content_type = ?

                AND reaction_user_id = ?

            ) AS temp

            INNER JOIN xf_post AS reaction_table ON (reaction_table.`post_id` = temp.content_id)

            SET reaction_table.`reaction_users` = REPLACE(reaction_table.`reaction_users`, ?, ?)

[/code]


Should be noted xf_reaction_content has a row count of 31m and xf_post has a row count of 4.7m


I've tried increasing lock timeouts but it really looks like it's just an issue with the query being too slow. The end result is the merge never completes and the CRON will re-attempt it every so often indefinitely.


Back
Top Bottom