Link checking not progressing: broken transaction handling?
-
I newly installed Broken Link Checker on WordPress 4.7.5 running on Ubuntu 16.04 with MariaDB 10.6. The BLC MySQL tables were created with the default InnoDB storage engine.
The scan of content to build the link table seemed to work OK (around 2300 unique links from 3700 total). But after several hours the link queue for checking had not reduced *at all*.
Enabling logging showed that the link checker was checking the same 30 links repeatedly – the first 30 in the database. Inspecting the database showed that these records were not being updated (eg with last checked time) even though the log showed that the UPDATEs were being executed OK.
Adding debugging log statements to BEGIN TRANSACTION/COMMIT/ROLLBACK statements in includes/transactions-manager.php showed that BEGIN TRANSACTION was being executed but COMMIT was not.
Review of code in includes/links.php suggests that the ‘start’ and the ‘commit’ are not balanced (the one commit call is oddly placed). The transaction code appears to be an attempt to tackle the problem of updates from other processes discussed in the comments, but does not appear to be correct.
Commenting out the BEGIN TRANSACTION/COMMIT/ROLLBACK statements in includes/transaction-manager.php enabled the queue to run successfully.
If the tables had used the previous default MyISAM storage engine then this problem would not have been visible as MyISAM does not support transaction handling and silent ignores BEGIN TRANSACTION/COMMIT/ROLLBACK statements.
- The topic ‘Link checking not progressing: broken transaction handling?’ is closed to new replies.