WordPress database error Deadlock

Just putting this one here. We have a fairly busy site and are seeing the below fairly often in the log file. Site is hosted on Azure.

[06-Aug-2024 16:52:18 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name = ‘cs_assignment_cache_layout_single’ made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include(’/themes/pro/functions.php’), Themeco\Theme\Theme->boot, require_once(’/themes/pro/framework/setup.php’), pro_load_cornerstone, cornerstone_boot, Themeco\Cornerstone\Plugin->initialize, Themeco\Cornerstone\Plugin->resolve, Themeco\Cornerstone\Util\IocContainer->resolve, Themeco\Cornerstone\Plugin->Themeco\Cornerstone{closure}, Themeco\Cornerstone\Services\Assignments->setup, Themeco\Cornerstone\Services\Assignments->clear_cached_assignments, delete_option

I’ve recently been running query monitor and have been noticing this as well. It seems to be recreating the layout cache on every request and has been since Pro 6.0. After 6.5.4, possibly in 6.5.5, we’ll have this fixed as well as some other db performance issues. Thanks for sending your findings to me.

2 Likes

Awesome, thanks.

1 Like