XenForo developer

Well, I would probably have to recommend upgrading to the latest version if possible. I recall making some tweaks regarding how transactions were used in the deferred system to try to resolve/reduce potential for deadlocks.

Active member

Well, I would probably have to recommend upgrading to the latest version if possible. I recall making some tweaks regarding how transactions were used in the deferred system to try to resolve/reduce potential for deadlocks.

Well-known member

1.2 adds a new "deferred" system for running any code that can be broken up into pieces and may take a long time (multiple seconds or more) to run. Deferred tasks can be triggered automatically by the code as necessary and they will either be run automatically in the background (by page views) or by displaying the current running state to the administrator (in the case of some cache rebuilds). This effectively unifies the cache rebuild systems with cron and other potentially long running processes (such as the bulk user change system discussed in the past).

XenForo developer

You might be able to run this now, but it might not have the correct deadlock info, so next time you see a deadlock, please run this query:

Code:

SHOW ENGINE INNODB STATUS;

(You may need to run this as the root MySQL user. I'm assuming you have root if you have a forum busy enough to trigger deadlocks like this consistently. If you're on a shared server, these issues may be down to the server being heavily overloaded.)

XenForo developer

You can run it in phpMyAdmin, but you do need to make sure it's run with a user with the "PROCESS" privilege in MySQL. (You can try running it; it should just error if you don't have the necessary privilege.)

10-20 minutes should be fine. It should keep a log of the last deadlock.

XenForo developer

That's likely unrelated to a true deadlock. See the note at the end: here: http://dev.mysql.com/doc/refman/5.0/en/innodb-lock-modes.html That would likely indicate that you had a large number of transactions pending, all waiting for the same thing. As these transactions are usually held for fractions of a second, I would guess that you had a massive load spike which caused the to effectively hang. That fits with getting multiple errors per second.