Database error when attempting to merge users

Affected version
2.1.2

Jawsh

Formerly null0
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`, ?, ?)
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.
 

Chris D

XenForo developer
Staff member
If you need urgent support with something, please submit a ticket or post in the troubleshooting/support forum.

Bug reports are dealt with periodically and cannot always be guaranteed to be resolved quickly.
 
Top