Too Many Database Errors About BatchProcessing
-
Hi, my website has too many these errors in debug.log . I guess it’s related to some triggering by “shutdown” event from the woocommerce.
https://ww.wp.xz.cn/plugins/woocommerce-legacy-rest-api/ is enabled in my website.
HPOS is never enabled.
Hosting package has 4 GB Ram support.
I’m using Woodmart, Jetpack, Facebook for Woocommerce, Google for Woocommerce, Product Feed PRO for WooCommerce.
Sample errors:
‘wc_pending_batch_processes’ LIMIT 1 made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->get_enqueued_processors, get_option [27-Dec-2025 23:18:07 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook=’wc_schedule_pending_batch_processes’ AND a.status IN (‘in-progress’, ‘pending’) LIMIT 0, 1 made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, call_user_func, as_has_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_DBStore->query_actions
I fixed it with that but but I’m not too sure about it.
add_action(‘init’, function () { remove_action( ‘shutdown’, [ Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController::class, ‘shutdown’ ] ); });
Woocommerce report:
https://limewire.com/d/EPfHT#iD9TvDmP5T
You must be logged in to reply to this topic.