• Resolved attosoftonline

    (@attosoftonline)


    Hello. Can someone help me with this error in log file, on a fresh site installed?

    WordPress database error Commands out of sync; you can’t run this command now for query SHOW FULL COLUMNS FROM wp_options made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, update_option

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey there, @attosoftonline! Thanks for contacting us. I’m happy to help you.

    The error message you’re seeing, “WordPress database error Commands out of sync; you can’t run this command now,” typically points to a situation where multiple database queries are being executed simultaneously, which can cause conflicts.

    Can you please head over to WooCommerce → Status → Tools, and do the following:

    WooCommerce transients – Clear
    Expired transients – Clear
    Clear template cache – Clear
    Capabilities – Reset Capabilities
    Clear customer sessions -Clear

    Then, check if the issue persists. If it does:

     on a fresh site installed

    To confirm, do you mean you have no other plugins installed in this website?

    If you do, I suggest updating all of them and checking if the issue persists.
    If it does, please run a conflict test to check if the issue persists.

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it..

    — It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.

    You can find more about this in this guide.

    Please let us know about your findings.

    Have a wonderful day!

    Thread Starter attosoftonline

    (@attosoftonline)

    Thank for your answer. My site has only Akismet Anti-spam: Spam Protection, WPBakery Page Builder, UpSolution Core ( from Impreza theme ) and… WooCommerce plugins.

    It seems that the error is gone, but now I have a smaller error log file, containing:

    [23-Jul-2024 15:11:31 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wp_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

    What is it?

    Hi there @attosoftonline,

    I’m glads to know that the error is now gone, and a different one is displayed.

    To resolve this error message, you might want to try disabling any recent plugins or themes you’ve installed one by one to see if the issue resolves, as sometimes a plugin or theme can conflict with WooCommerce’s database queries.

    Here are proper steps to run a conflict test in your store to see if this helps in stopping the error message.

    Let us know how it goes.

    Thread Starter attosoftonline

    (@attosoftonline)

    Realy strange. Another error. ?! (and note that the site was not accessed by anybody during this time, to say that the errors are generated because accessing process)..

    [25-Jul-2024 05:42:07 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SHOW FULL COLUMNS FROM wp_options made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, update_option

    I will try to reinstall all site for the third time, to see what’s happend..

    ( I use WordPress 6.6.1 and WooCommerce 9.1.2 )

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @attosoftonline

    The error you’re experiencing is usually due to simultaneous database queries, which can cause conflicts. However, it seems like you’ve already tried clearing transients and running a conflict test, which are the usual steps for resolving this issue.

    Since you’re still experiencing this error, it might be related to your server configuration. It’s possible that your MySQL server has a strict mode enabled that’s causing these errors. You might need to check with your hosting provider about this.

    Also, as you mentioned, you’re planning to reinstall your site for the third time. Before you do that, you may want to try a few more things:

    1. Ensure that your server meets the minimum requirements for running WooCommerce. You can check the requirements here: https://docs.woocommerce.com/document/server-requirements/
    2. Try to increase your PHP memory limit. Here’s how you can do it: https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php
    3. If you’re comfortable with it, you can try to repair your database. Please make sure to backup your database before doing this. Here’s a guide on how to do it: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

    If the issue persists after trying these steps, a fresh reinstall might be the best option. Please ensure that you have a full backup of your site before proceeding.

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

    Thread Starter attosoftonline

    (@attosoftonline)

    And it’s strange that ( as WooCommerce is note – Log files are stored in this directory: public_html/wp-content/uploads/wc-logs/ ) , this folder are NOT contain any logs.

    The log file is appeared in public_html/error_log

    Thanks for advice!

    Zee

    (@doublezed2)

    Hello attosoftonline

    Thank you for your reply.

    The public_html/error_log directory is used by the server to log PHP errors.
    This may also contain logs related to WooCommerce.

    I recommend you try the 3 points suggested in the last message and check if the issue persists.

    Please don’t hesitate to contact us again if the issue persists.
    We are here to help 🙂

    Best regards.

    Thread Starter attosoftonline

    (@attosoftonline)

    I’ve found some kind of errors here: https://wordpress.org/support/topic/database-error-commands/

    Sorry. The problem is not solved..

    Server architecture

    Linux 5.14.0-362.24.2.el9_3.x86_64 x86_64

    Web server

    LiteSpeed

    PHP version

    8.3.6 (Supports 64bit values)

    PHP SAPI

    litespeed

    PHP max input variables

    1000

    PHP time limit

    30

    PHP memory limit

    368M !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Max input time

    60

    Upload max filesize

    4M

    PHP post max size

    8M

    cURL version

    7.76.1 OpenSSL/3.0.7

    Is SUHOSIN installed?

    No

    Is the Imagick library available?

    Yes

    Are pretty permalinks supported?

    Yes

    .htaccess rules

    Your .htaccess file contains only core WordPress features.

    ……………

    [26-Jul-2024 03:42:27 UTC] WordPress database error Commands out of sync; you can’t run this command now for query UPDATE wp_options SET option_value = ‘1724557347’ WHERE option_name = ‘_transient_timeout_woocommerce_blocks_asset_api_script_data’ made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, update_option
    [26-Jul-2024 04:42:28 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
    [26-Jul-2024 04:42:28 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wp_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
    [26-Jul-2024 04:42:28 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SELECT autoload FROM wp_options WHERE option_name = ‘_transient_timeout_woocommerce_blocks_asset_api_script_data’ LIMIT 1 made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, update_option
    [26-Jul-2024 04:42:28 UTC] WordPress database error Commands out of sync; you can’t run this command now for query SHOW FULL COLUMNS FROM wp_options made by shutdown_action_hook, do_action(‘shutdown’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\Api->update_script_data_cache, set_transient, update_option

    ———————

    I said to wait, to see what happens overnight, when the site was not accessed by anyone..

    Thread Starter attosoftonline

    (@attosoftonline)

    P.S. The wp_users table is okay.
    The wp_usermeta table is okay.
    The wp_posts table is okay.
    The wp_comments table is okay.
    The wp_links table is okay.
    The wp_options table is okay.
    The wp_postmeta table is okay.
    The wp_terms table is okay.
    The wp_term_taxonomy table is okay.
    The wp_term_relationships table is okay.
    The wp_termmeta table is okay.
    The wp_commentmeta table is okay.
    The wp_woocommerce_payment_tokenmeta table is okay.
    The wp_woocommerce_order_itemmeta table is okay.
    The wp_wc_product_meta_lookup table is okay.
    The wp_wc_tax_rate_classes table is okay.
    The wp_wc_reserved_stock table is okay.
    The wp_actionscheduler_actions table is okay.
    The wp_actionscheduler_claims table is okay.
    The wp_actionscheduler_groups table is okay.
    The wp_actionscheduler_logs table is okay.
    The wp_wc_category_lookup table is okay.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘WordPress database error Commands out of sync; you can’t run this command now’ is closed to new replies.