deadlock creating a total mess
-
We are regularly getting deadlocks from
AAL_API->_delete_old_items()
when Woo Subscriptions runs renewals.The effect is that most of the time the post metadata exists, but the post itself is missing. This has created a ton of orphaned data and cost several clients a good deal of money.
The sites have a LOT of CPU and memory behind it and the DB runs quite fast. We do allow the Activity Log table to get large, but I assumed it could handle it. Perhaps the way it is coded does not work well at scale.
This is what we are seeing:
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_aryo_activity_log WHERE hist_time < 1628169944 made by do_action_ref_array('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_Action->execute, do_action_ref_array('woocommerce_scheduled_subscription_payment'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Subscriptions_Manager::prepare_renewal, WC_Subscriptions_Manager::process_renewal, wcs_create_renewal_order, wcs_create_order_from_subscription, wc_create_order, WC_Order->save, WC_Abstract_Order->save, WC_Data_Store->create, WC_Order_Data_Store_CPT->create, Abstract_WC_Order_Data_Store_CPT->create, wp_insert_post, wp_transition_post_status, do_action('transition_post_status'), WP_Hook->do_action, WP_Hook->apply_filters, AAL_Hook_Posts->hooks_transition_post_status, aal_insert_log, AAL_API->insert, AAL_API->_delete_old_items
- The topic ‘deadlock creating a total mess’ is closed to new replies.