• Resolved serahill

    (@serahill)


    I updates my site’s woocommerce to the latest version a few hours ago, and I have been getting this error “WordPress database error Commands out of sync” ever since. I’ve been trying to figure out what this could be caused by but have not found anything. The full error message is:

    [16-Aug-2023 18:37:14 UTC] WordPress database error Commands out of sync; you can't run this command now for query UPDATE prefix_options SET option_value = '1692211094' WHERE option_name = 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set, update_option
    [16-Aug-2023 18:37:14 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT COUNT(DISTINCT claim_id) FROM prefix_actionscheduler_actions WHERE claim_id != 0 AND status IN ( 'pending', 'in-progress') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch, ActionScheduler_AsyncRequest_QueueRunner->allow, ActionScheduler_Abstract_QueueRunner->has_maximum_concurrent_batches, ActionScheduler_DBStore->get_claim_count
    [16-Aug-2023 18:37:14 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM prefix_actionscheduler_actions a WHERE 1=1 AND a.status IN ('pending') AND a.scheduled_date_gmt <= '2023-08-16 18:37:14' LIMIT 0, 5 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch, ActionScheduler_AsyncRequest_QueueRunner->allow, ActionScheduler_Store->has_pending_actions_due, ActionScheduler_DBStore->query_actions
    
    



    I have tried to disable other plugins but it still occurs, any ideas that could help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try clearing(or deactivating) your cache plugin as well as any cache you have on the hosting.

    Thread Starter serahill

    (@serahill)

    That did not solve the problem but I I got a new error in addition to the ones above.

    [17-Aug-2023 05:25:37 UTC] PHP Fatal error:  Uncaught RuntimeException: It is not possible to release functions from claim identifier 0. in /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1030
    Stack trace:
    #0 /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(173): ActionScheduler_DBStore->release_claim()
    #1 /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(136): ActionScheduler_QueueRunner->do_batch()
    #2 /data/wordpress/wp-includes/class-wp-hook.php(308): ActionScheduler_QueueRunner->run()
    #3 /data/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #4 /data/wordpress/wp-includes/plugin.php(565): WP_Hook->do_action()
    #5 /data/wordpress/wp-cron.php(188): do_action_ref_array()
    #6 {main}
      thrown in /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 1030
    
    [17-Aug-2023 05:25:37 UTC] PHP Fatal error:  Uncaught RuntimeException: It is not possible to release functions from claim identifier 0. in /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:1030
    Stack trace:
    #0 /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php(52): ActionScheduler_DBStore->release_claim()
    #1 /data/wordpress/wp-includes/class-wp-hook.php(308): ActionScheduler_FatalErrorMonitor->handle_unexpected_shutdown()
    #2 /data/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #3 /data/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /data/wordpress/wp-includes/load.php(1144): do_action()
    #5 [internal function]: shutdown_action_hook()
    #6 {main}
      thrown in /data/wordpress/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 1030
    • This reply was modified 1 year, 3 months ago by serahill.
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @serahill

    From the error messages you’ve provided, it seems the problem is related to the ActionScheduler, a library used by WooCommerce to handle scheduled tasks. The error “Commands out of sync” typically occurs when a stored procedure or a query that fetches multiple rows is not fully executed, leaving the MySQL connection in an unusable state.

    You mentioned that you’ve tried disabling other plugins, but the issue still occurs. Try disabling all plugins except WooCommerce and then re-enable them one by one to identify if a specific plugin is causing the issue. You can find a detailed explanation of conducting a conflict test here.

    If the issue persists, you can try using the Repair Action Scheduler plugin that can fix this issue automatically on most sites:

    I hope this helps! Please let us know how it goes or if you need further assistance.

    Thank you for your patience and cooperation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DB out of sync after update’ is closed to new replies.