{"id":18768912,"date":"2025-12-28T11:48:56","date_gmt":"2025-12-28T11:48:56","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/too-many-database-errors-about-batchprocessing\/"},"modified":"2025-12-28T13:10:58","modified_gmt":"2025-12-28T13:10:58","slug":"too-many-database-errors-about-batchprocessing","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/too-many-database-errors-about-batchprocessing\/","title":{"rendered":"Too Many Database Errors About BatchProcessing"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi, my website has too many these errors in debug.log . I guess it&#8217;s related to some triggering by &#8220;shutdown&#8221; event from the woocommerce. <br \/><br \/><a href=\"https:\/\/wordpress.org\/plugins\/woocommerce-legacy-rest-api\/\">https:\/\/wordpress.org\/plugins\/woocommerce-legacy-rest-api\/<\/a> is enabled in my website. <br \/><br \/>HPOS is never enabled. <br \/><br \/>Hosting package has 4 GB Ram support.<br \/><br \/>I&#8217;m using Woodmart, Jetpack, Facebook for Woocommerce, Google for Woocommerce, Product Feed PRO for WooCommerce. <br \/><br \/>Sample errors:<br \/><br \/>&#8216;wc_pending_batch_processes&#8217; LIMIT 1 made by shutdown_action_hook, do_action(&#8216;shutdown&#8217;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController-&gt;Automattic\\WooCommerce\\Internal\\BatchProcessing{closure}, Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController-&gt;remove_or_retry_failed_processors, Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController-&gt;get_enqueued_processors, get_option [27-Dec-2025 23:18:07 UTC] WordPress database error Commands out of sync; you can&#8217;t run this command now for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook=&#8217;wc_schedule_pending_batch_processes&#8217; AND a.status IN (&#8216;in-progress&#8217;, &#8216;pending&#8217;) LIMIT 0, 1 made by shutdown_action_hook, do_action(&#8216;shutdown&#8217;), WP_Hook-&gt;do_action, WP_Hook-&gt;apply_filters, Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController-&gt;Automattic\\WooCommerce\\Internal\\BatchProcessing{closure}, Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController-&gt;remove_or_retry_failed_processors, call_user_func, as_has_scheduled_action, ActionScheduler_Store-&gt;query_action, ActionScheduler_DBStore-&gt;query_actions<br \/><br \/>I fixed it with that but but I&#8217;m not too sure about it.<br \/><br \/><strong>add_action(&#8216;init&#8217;, function () { remove_action( &#8216;shutdown&#8217;, [ Automattic\\WooCommerce\\Internal\\BatchProcessing\\BatchProcessingController::class, &#8216;shutdown&#8217; ] ); });<br \/><\/strong><br \/><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><br \/><br \/>Woocommerce report:<br \/><br \/><a href=\"https:\/\/limewire.com\/d\/EPfHT#iD9TvDmP5T\">https:\/\/limewire.com\/d\/EPfHT#iD9TvDmP5T<\/a><\/code><\/pre>\n","protected":false},"template":"","class_list":["post-18768912","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18768912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":4,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18768912\/revisions"}],"predecessor-version":[{"id":18768918,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18768912\/revisions\/18768918"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18768912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}