• Resolved shimist

    (@shimist)


    These errors occur in the error_log.

    [14-Oct-2025 03:29:47 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM test_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
    [14-Oct-2025 03:29:47 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM test_options WHERE option_name = '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
    [14-Oct-2025 06:46:03 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM test_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
    [14-Oct-2025 06:46:03 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM test_options WHERE option_name = '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

    PHP 8.3

    WooCommerce Version 10.2.2

    WordPress 6.8.3

Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    Thanks for the update. Just to clarify, after following the previous steps and clearing the cache, did the issue disappear temporarily and then reappear, or has it been persistent the whole time?

    As the next step, I recommend manually running the pending Action Scheduler tasks again:

    1. Go to WooCommerce → Status → Scheduled Actions.
    2. Filter by pending or in-progress actions.
    3. Select the affected actions and click Run or Run Now to process them manually.

    After running these tasks, please monitor your site and the error log to see if the issue persists. This can help determine whether the problem is caused by specific stuck jobs or if further investigation is needed.

    Thread Starter shimist

    (@shimist)

    @shahzeenfarooq It disappeared temporarily and reappeared after about 20 minutes.

    WooCommerce → Status → Scheduled Actions.===>Pending

    These tasks are pending

    woocommerce_cleanup_logs ===Every 1 day
    woocommerce_geoip_updater===Every 2 weeks
    woocommerce_cleanup_rate_limits_wrapper ===Every 1 day
    woocommerce_scheduled_sales ===Every 1 day
    woocommerce_cleanup_personal_data ===Every 1 day
    action_scheduler_run_recurring_actions_schedule_hook ===Every 1 day
    wc_admin_daily_wrapper ===Every 1 day
    woocommerce_cleanup_draft_orders ===Every 1 day
    woocommerce_refresh_order_count_cache==== Every 12 hours
    wp_mail_smtp_admin_notifications_update=======Every 1 day
    woocommerce_cleanup_sessions ==== Every 12 hours
    woocommerce_cancel_unpaid_orders====Without repetition

    When I run these manually, the same error occurs again after a while

    • This reply was modified 4 months, 4 weeks ago by shimist.
    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    Thank you for the update. Since the issue persists even after disabling all plugins and clearing the cache, the next steps involve reviewing the server environment more closely.

    Please contact your hosting provider and ask them to check whether any WooCommerce-related database queries are being:

    • Blocked
    • Interrupted
    • Terminated due to timeouts
    • Rolled back unexpectedly

    The database error you’re seeing can occur when MySQL interrupts an active query, so checking these logs is important.

    Also, Please ask your host to Enable a real cron job. This helps ensure Action Scheduler tasks run consistently. If your hosting environment uses Redis, Memcached, or any server-level caching, please ask them to temporarily disable it.
    Aggressive caching can sometimes interfere with scheduled tasks or database processes.

    Please also enable debug logging so we can capture additional errors:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );

    After enabling this, try to reproduce the issue again, then share the file located at: /wp-content/debug.log. Along with the WordPress debug log, please also request your hosting provider to share any relevant server-side error logs (MySQL/MariaDB or PHP-FPM). These logs can help identify what is causing the “commands out of sync” error.

    Plugin Support thelmachido a11n

    (@thelmachido)

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick review here: 

    https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new

Viewing 4 replies - 16 through 19 (of 19 total)

You must be logged in to reply to this topic.