• Resolved linux4me2

    (@linux4me2)


    Since upgrading to WooCommerce 7.6.0, my error_log is filling up with WordPress database errors like this in runs of three every minute or so:

    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\Jetpack\Autoloader\jpa10d711ec5dd1299c49f4fb90df5a407\Shutdown_Handler->__invoke, Automattic\Jetpack\Autoloader\jpa10d711ec5dd1299c49f4fb90df5a407\Plugins_Handler->cache_plugins, set_transient, update_option

    I do not have Jetpack installed.

    I searched my plugins directory for Automattic\Jetpack\Autoloader\jpa10d711ec5dd1299c49f4fb90df5a407, and found it in WooCommerce.

    I am running a caching plugin (WP Super Cache), and I tried clearing the cache, but the errors continued.

    I am using a standard theme. I don’t have the luxury of deleting other plugins to look for conflicts because the error only occurs on the production site. I have not been able to reproduce it on my staging site. Though there are differences in the data between the production and staging sites, the plugins are same with the exception of the WooCommerce-ShipStation Integration plugin, which is on the production site only.

    Any ideas on how to further troubleshoot and resolve this error?

    My system report:

    ### WordPress Environment ###
    
    WordPress address (URL): https://thedomain.com
    Site address (URL): https://thedomain.com
    WC Version: 7.6.0
    REST API Version: ? 7.6.0
    WC Blocks Version: ? 9.8.4
    Action Scheduler Version: ? 3.5.4
    Log Directory Writable: ?
    WP Version: 6.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: LiteSpeed
    PHP Version: 8.0.28
    PHP Post Max Size: 128 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 3000
    cURL Version: 7.61.1
    OpenSSL/1.1.1k
    
    SUHOSIN Installed: –
    MySQL Version: 10.5.19-MariaDB-cll-lve
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 7.6.0
    WC Database Prefix: wp_
    Total Database Size: 469.19MB
    Database Data Size: 291.00MB
    Database Index Size: 178.19MB
    wp_woocommerce_sessions: Data: 2.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 9.52MB + Index: 2.52MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 65.59MB + Index: 47.11MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.08MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.27MB + Index: 0.23MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 1.50MB + Index: 0.61MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 0.47MB + Index: 0.30MB + Engine InnoDB
    wp_commentmeta: Data: 1.52MB + Index: 1.91MB + Engine InnoDB
    wp_comments: Data: 26.55MB + Index: 15.09MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 4.50MB + Index: 1.39MB + Engine InnoDB
    wp_postmeta: Data: 132.66MB + Index: 74.17MB + Engine InnoDB
    wp_posts: Data: 10.52MB + Index: 6.06MB + Engine InnoDB
    wp_relevanssi: Data: 7.52MB + Index: 9.55MB + Engine InnoDB
    wp_relevanssi_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_relevanssi_stopwords: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_termmeta: Data: 0.16MB + Index: 0.16MB + Engine InnoDB
    wp_terms: Data: 0.13MB + Index: 0.13MB + Engine InnoDB
    wp_term_relationships: Data: 0.23MB + Index: 0.14MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.11MB + Index: 0.13MB + Engine InnoDB
    wp_tinvwl_analytics: Data: 0.20MB + Index: 0.11MB + Engine InnoDB
    wp_tinvwl_items: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
    wp_tinvwl_lists: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    wp_usermeta: Data: 8.52MB + Index: 6.03MB + Engine InnoDB
    wp_users: Data: 0.47MB + Index: 0.30MB + Engine InnoDB
    wp_wcpdf_invoice_number: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 1.52MB + Index: 0.58MB + Engine InnoDB
    wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.16MB + Index: 0.17MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 10.52MB + Index: 9.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 3.52MB + Index: 1.28MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.13MB + Index: 0.13MB + Engine InnoDB
    wp_wc_product_attributes_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.31MB + Index: 0.45MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY
    wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 1736
    cfredux_contact_form: 4
    mc4wp-form: 1
    nav_menu_item: 155
    page: 123
    post: 14
    product: 680
    product_variation: 2306
    revision: 231
    shop_coupon: 29
    shop_order: 18567
    shop_order_refund: 423
    soliloquy: 1
    wp_block: 1
    wp_global_styles: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (15) ###
    
    Autoptimize: by Frank Goossens (futtta) – 3.1.6
    Contact Form Redux: by linux4me – 1.3.3
    MainWP Child: by MainWP – 4.4.1
    Relevanssi: by Mikko Saari – 4.19.0
    Simple Lightbox: by Archetyped – 2.9.3
    Responsive WordPress Slider - Soliloquy Lite: by Soliloquy Team – 2.7.2
    TI WooCommerce Wishlist: by TemplateInvaders – 2.3.6
    User Role Editor: by Vladimir Garagulya – 4.63.3
    Payment Plugins for Stripe WooCommerce: by Payment Plugins
    [email protected] – 3.3.40
    
    WooCommerce Bill Shipping Account: by linux4me – 1.0.0
    PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.5.2
    WooCommerce - ShipStation Integration: by WooCommerce – 4.3.6
    WooCommerce: by Automattic – 7.6.0
    Wordfence Login Security: by Wordfence – 1.1.2
    WP Super Cache: by Automattic – 1.9.4
    
    ### Inactive Plugins (0) ###
    
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ?
    Enforce Approved Product Download Directories: –
    Order datastore: WC_Order_Data_Store_CPT
    
    ### WC Pages ###
    
    Shop base: #2799 - /shop/
    Cart: #14 - /cart/
    Checkout: #15 - /checkout/
    My account: #16 - /my-account/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Twenty Sixteen Child
    Version: 1.0.0
    Author URL: https://trackitweb.com/
    Child Theme: ?
    Parent Theme Name: Twenty Sixteen
    Parent Theme Version: 2.9
    Parent Theme Author URL: https://www.ads-software.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    
    Disabled Features: block-editor-feature-enabled
    minified-js
    new-product-management-experience
    product-variation-management
    settings
    
    Daily Cron: ? Next scheduled: 2023-04-21 16:53:14 -07:00
    Options: ?
    Notes: 41
    Onboarding: completed
    
    ### TI WooCommerce Wishlist Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 2,077
    Oldest: 2023-03-20 11:23:30 -0700
    Newest: 2023-04-20 11:07:25 -0700
    
    Pending: 3
    Oldest: 2023-04-20 11:22:57 -0700
    Newest: 2023-04-21 10:11:31 -0700
    
    
    ### Status report information ###
    
    Generated at: 2023-04-20 11:19:11 -07:00
Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi,

    I’ve seen this error when the memory is exhausted, not sure if it is your case, but it is a possibility.

    WP Memory Limit: 256 MB While your site has the minimum of memory required to work properly it is in the lower limit, you can request your web host to increase your memory limit to see if that helps to solve the issue.

    If that does not help, please navigate WooCommerce > System Status > Logs, and provide us with the full error message/stack trace.

    Cheers.

    Thread Starter linux4me2

    (@linux4me2)

    Hi @ihereira

    Thanks for the reply.

    I have increased (doubled) the WP Memory Limit to 512 MB:

    ### WordPress Environment ###
    
    WordPress address (URL): https://thedomain.com
    Site address (URL): https://thedomain.com
    WC Version: 7.6.0
    REST API Version: ? 7.6.0
    WC Blocks Version: ? 9.8.4
    Action Scheduler Version: ? 3.5.4
    Log Directory Writable: ?
    WP Version: 6.2
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –

    and cleared the error_log to see if that resolves the error.

    I will give it a little time and post back with the results.

    I know you said to wait until the error recurred with the increased memory, but I took a look in WooCommerce > System Status > Logs because I couldn’t recall seeing anything about the error there, and there isn’t. The only error log in there is test-log.log, and it’s empty.

    Thread Starter linux4me2

    (@linux4me2)

    No luck with 512 MB for the WP Memory Limit:

    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\Jetpack\Autoloader\jpa10d711ec5dd1299c49f4fb90df5a407\Shutdown_Handler->__invoke, Automattic\Jetpack\Autoloader\jpa10d711ec5dd1299c49f4fb90df5a407\Plugins_Handler->cache_plugins, set_transient, update_option

    There are no error logs in WooCommerce > System Status > Logs after these errors in error_log.

    Why is WooCommerce 7.6.0 repeatedly calling a shutdown handler for a plugin I don’t even have installed, anyway?

    Hi,

    Sorry to hear about that.

    I understand the issue is not present in your staging site, only in your production site.

    I recommend running a conflict test, you will need to switch the site theme to Storefront temporarily, and then disable all plugins except WooCommerce? Check again to see if the issue persists, if not, it means a conflict was affecting the site, and you can then switch back your theme to the original one, and then the rest of the plugins (checking again after each plugin reactivation), until you find the cause of the problem. More info: https://woocommerce.com/document/how-to-test-for-conflicts/

    I recommend you to install this plugin, called Check Conflicts, https://www.ads-software.com/plugins/check-conflicts/

    Check Conflicts enables you to toggle plugins on or off and/or activate a default theme for conflict assessment purposes, specifically for your IP address. Other users will not experience any changes during these tests.

    Let us know how that goes.

    Thread Starter linux4me2

    (@linux4me2)

    Hi @ihereira,

    I would be glad to try that, but I don’t see how it can work because the current theme and all plugins will be active for all other users, and the database error will still be triggered by them, showing up in the error_log file and leading me to believe that the problem continues even though I would not be triggering it.

    Since I have not discovered a way to trigger the error through some behavior of my own, I don’t have a way to test even with the Check Conflicts plugin.

    Based on the code, can you tell me how I can trigger the error manually?

    By the way, can you answer this question:

    Why is WooCommerce 7.6.0 repeatedly calling a shutdown handler for a plugin I don’t even have installed, anyway?

    Thread Starter linux4me2

    (@linux4me2)

    I think I may have found a solution.

    When I searched the Internet for more information on this error before posting here, I found several mentions of WordPress database errors “command out of sync” with Wordfence on Litespeed servers.

    The site is not running Wordfence, but it is using Wordfence Login Security. That’s one plugin I can temporarily deactivate on the production site, so I disabled it and I haven’t gotten any of the errors in the past ~one hour.

    Based on the logs I have, the longest it has gone before without the error recurring was 56 minutes, and usually it recurred every two minutes or so, so I am cautiously optimistic. I will post back with results.

    Thread Starter linux4me2

    (@linux4me2)

    Wordfence Login Security wasn’t the problem. The errors are still occurring; it just took a while to see them again.

    Hello,

    can you answer this question:

    Why is WooCommerce 7.6.0 repeatedly calling a shutdown handler for a plugin I don’t even have installed, anyway?

    It is still not clear what is the real cause, there could be some of them, for example a caching plugin, a query not being completed by a plugin or the theme.

    I would suggest checking whether the error recurs by deactivating your cache plugin and also on the server-side. Typically, this issue arises when a plugin leaves residual database queries or fails to close correctly. Please try to clear the cache and see if it resolves the problem.

    If not, I recommend to reach out to your web host, you can request them to help you to repair the database.

    Please note: Before making any critical change, be sure to back up your site.

    Let us know how that goes for you.

    Thread Starter linux4me2

    (@linux4me2)

    Hi @ihereira,

    Clearing the cache was one of the first things I tried, but it didn’t work.

    The other things I’ve tried that made no difference are:

    • Checking/optimizing the wp_options table (the one in the error) with phpMyAdmin to make sure there were no problems with it (there weren’t)
    • compared the Jetpack autoloader code from WooCommerce 6.5.1 and 7.6.0; there’s no difference, though I don’t believe the error occurred in v. 6.5.1

    Yesterday evening, I contacted my web host to ask them to take a look at the MariaDB and syslogs, which I don’t have access to, in order to see if there are any issues occurring at the times corresponding to the errors in the list that I sent them.

    My web host said there was nothing, but did recommend that I enable WP_DEBUG to see if there was any more information about the error.

    I did enable WP_DEBUG, but there was no additional information abou tthe error.

    This morning, I disabled both WP Super Cache and Autoptimize, but the errors continue, so that I guess that rules out a caching issue.

    The interesting thing is that while WP_DEBUG is still listing the errors in /wp-content/debug.log, if I SSH into the server, switch to the public_html folder–the folder where the production site is–and run this:

    find -type f -name "error_log" -print

    I don’t get any results, so I don’t know what folder the errors are coming from.

    Thread Starter linux4me2

    (@linux4me2)

    I can’t explain the lag between the time I deactivated WP Super Cache and Autoptimize, and when the errors finally stopped–a few hours, maybe?–but there have been no more WP database errors since 25-Apr-2023 17:35:30 UTC. Maybe there were some queries in a cron task that hadn’t executed?

    Anyway, I’m thinking that the issue was with WP Super Cache and/or Autoptimize, most likely WP Super Cache.

    Hi @linux4me2

    Anyway, I’m thinking that the issue was with WP Super Cache and/or Autoptimize, most likely WP Super Cache.

    I’m glad you were able to find the culprits of your issue here.

    Since these are third-party plugins which we don’t provide support for (please see our Support Policy), it would be best to reach out to the plugin’s developers for further assistance here.

    All the best and hopefully, the issue will be fixed soon.

    Thanks!

    Thread Starter linux4me2

    (@linux4me2)

    Thanks @xue28,

    Actually, WP Super Cache is now another Automattic plugin, but I get your point.

    The fix I used was to delete both WP Super Cache and Autoptimize and use LS Cache for my caching/optimization solution. The WP database errors from WooCommerce have not recurred.

    Hi @linux4me2

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    Meanwhile, if you have a moment to spare, we would love it if you could share your thoughts with us by leaving a review or feedback. Your experience and feedback are important to help us improve and ensure we’re always providing the best possible support.

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WordPress database error Commands out of sync’ is closed to new replies.