• We’ve just migrated a website over to HPOS and since we’ve seeing a number of errors in the logs referencing Commands Out of Sync; You Can’t Run This Command Now and when checking Action Scheduler, we’ve noticed we have a lot of past-due wc-admin_import_orders actions.

    When running wp action-scheduler run manually, it can take anything from 5 seconds to 12 minutes (if not longer) per action and the website is receiving orders faster than the action scheduler can complete the actions.

    I’ve had to redact the website for privacy reasons.

    ### WordPress Environment ###

    WC Version: 9.0.2
    Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.
    Action Scheduler Version: ✔ 3.8.1
    Log Directory Writable: ✔
    WP Version: 6.5.5
    WP Multisite: –
    WP Memory Limit: 2 GB
    WP Debug Mode: –
    WP Cron: –
    Language: en_GB
    External object cache: –

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 8.2.20
    PHP Post Max Size: 2 GB
    PHP Time Limit: 600
    PHP Max Input Vars: 20000
    cURL Version: 7.87.0
    OpenSSL/1.1.1w

    SUHOSIN Installed: –
    MySQL Version: 10.6.18-MariaDB-cll-lve
    Max Upload Size: 1 GB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔

    ### Database ###

    WC Database Version: 9.0.2
    WC Database Prefix: wc_
    Total Database Size: 5401.73MB
    Database Data Size: 3476.80MB
    Database Index Size: 1924.93MB
    wc_woocommerce_sessions: Data: 7.48MB + Index: 0.28MB + Engine InnoDB
    wc_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wc_woocommerce_order_items: Data: 43.56MB + Index: 10.52MB + Engine InnoDB
    wc_woocommerce_order_itemmeta: Data: 299.88MB + Index: 229.42MB + Engine InnoDB
    wc_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wc_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wc_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_actionscheduler_actions: Data: 12.02MB + Index: 23.56MB + Engine InnoDB
    wc_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_actionscheduler_logs: Data: 9.02MB + Index: 6.03MB + Engine InnoDB
    wc_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_comments: Data: 169.72MB + Index: 125.31MB + Engine InnoDB
    wc_competition_entries: Data: 85.61MB + Index: 73.17MB + Engine InnoDB
    wc_credit_transactions: Data: 34.55MB + Index: 0.00MB + Engine InnoDB
    wc_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_litespeed_img_optming: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_options: Data: 4.52MB + Index: 1.67MB + Engine InnoDB
    wc_postmeta: Data: 2227.98MB + Index: 1143.69MB + Engine InnoDB
    wc_posts: Data: 84.61MB + Index: 42.16MB + Engine InnoDB
    wc_referral_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_tm_taskmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_tm_tasks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_usermeta: Data: 43.58MB + Index: 27.11MB + Engine InnoDB
    wc_users: Data: 2.52MB + Index: 1.11MB + Engine InnoDB
    wc_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_wc_customer_lookup: Data: 2.52MB + Index: 1.80MB + Engine InnoDB
    wc_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_wc_orders: Data: 95.02MB + Index: 21.32MB + Engine MyISAM
    wc_wc_orders_meta: Data: 174.44MB + Index: 113.54MB + Engine MyISAM
    wc_wc_order_addresses: Data: 46.80MB + Index: 33.56MB + Engine MyISAM
    wc_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_wc_order_operational_data: Data: 43.03MB + Index: 13.48MB + Engine MyISAM
    wc_wc_order_product_lookup: Data: 43.58MB + Index: 33.06MB + Engine InnoDB
    wc_wc_order_stats: Data: 37.56MB + Index: 22.55MB + Engine InnoDB
    wc_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wc_wc_product_attributes_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wc_product_download_directories: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wc_wc_product_meta_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    wc_wc_rate_limits: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wc_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_wfblockediplog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfblocks7: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfconfig: Data: 0.42MB + Index: 0.01MB + Engine MyISAM
    wc_wfcrawlers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wffilechanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wffilemods: Data: 3.30MB + Index: 0.28MB + Engine MyISAM
    wc_wfhits: Data: 1.18MB + Index: 0.19MB + Engine MyISAM
    wc_wfhoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfissues: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wc_wfknownfilelist: Data: 2.40MB + Index: 0.12MB + Engine MyISAM
    wc_wflivetraffichuman: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wflocs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wflogins: Data: 0.78MB + Index: 0.12MB + Engine MyISAM
    wc_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wc_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY
    wc_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wc_wfnotifications: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfpendingissues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfreversecache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfsecurityevents: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfsnipcache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfstatus: Data: 0.08MB + Index: 0.04MB + Engine MyISAM
    wc_wftrafficrates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wfwaffailures: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wc_wpfm_backup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM

    ### Post Type Counts ###

    acf-field: 131
    acf-field-group: 10
    attachment: 427
    competition: 512
    custom_css: 1
    nav_menu_item: 6
    page: 17
    post: 3
    product: 1
    revision: 54
    shop_order: 282317
    winner: 339
    wpcf7_contact_form: 1

    ### Security ###

    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔

    ### Active Plugins (12) ###

    Action Scheduler High Volume: by Prospress Inc. – 1.1.0
    Action Scheduler: by Automattic – 3.8.1
    Advanced Custom Fields PRO: by WP Engine – 6.3.3
    Cashflows Payments by iDEAL Checkout: by iDEAL Checkout – 2.1.9.1
    Contact Form 7: by Takayuki Miyoshi – 5.9.6
    Nochex API: by Nochex Ltd – 3.0.2
    PixelYourSite: by PixelYourSite – 9.6.2
    WooCommerce: by Automattic – 9.0.2
    Wordfence Security: by Wordfence – 7.11.6
    SendGrid: by SendGrid – 1.11.8
    WP Crontrol: by John Blackbourn – 1.16.3
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.4.0


    ### Inactive Plugins (3) ###

    AG OPP COPYandPAY Payment Gateway: by We are AG – 1.4.1
    Query Monitor: by John Blackbourn – 3.16.3
    SQLite Object Cache: by Oliver Jones – 1.3.8

    ### Dropin Plugins () ###

    advanced-cache.php: advanced-cache.php
    maintenance.php: maintenance.php

    ### Settings ###

    API Enabled: –
    Force SSL: –
    Currency: GBP (£)
    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: –
    HPOS feature enabled: ✔
    Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore
    HPOS data sync enabled: ✔

    ### Logging ###

    Enabled: ✔
    Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
    Retention period: 30 days
    Level threshold: –
    Log directory size: 372 MB

    ### WC Pages ###

    Shop base: #12 - /shop/
    Basket: #13 - /basket/
    Checkout: #14 - /checkout/
    My account: #15 - /my-account/
    Terms and conditions: #190 - /terms-conditions/

    ### Theme ###

    Name: REDACTED
    Version: 1.0
    Author URL: REDACTED
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build
    personally we recommend using a child theme. See: How to create a child theme

    WooCommerce Support: ✔

    ### Templates ###

    Overrides: REDACTED/woocommerce/cart/cart-empty.php
    REDACTED/woocommerce/cart/cart.php
    REDACTED/woocommerce/cart/proceed-to-checkout-button.php
    REDACTED/woocommerce/checkout/form-checkout.php
    REDACTED/woocommerce/checkout/payment.php
    REDACTED/woocommerce/checkout/thankyou.php
    REDACTED/woocommerce/emails/customer-new-account.php
    REDACTED/woocommerce/emails/email-styles.php
    REDACTED/woocommerce/myaccount/form-edit-account.php
    REDACTED/woocommerce/myaccount/form-edit-address.php
    REDACTED/woocommerce/myaccount/form-login.php
    REDACTED/woocommerce/myaccount/form-lost-password.php version 7.0.1 is out of date. The core version is 9.0.0
    REDACTED/woocommerce/myaccount/form-reset-password.php
    REDACTED/woocommerce/myaccount/my-address.php
    REDACTED/woocommerce/myaccount/navigation.php version 2.6.0 is out of date. The core version is 9.0.0
    REDACTED/woocommerce/myaccount/orders.php
    REDACTED/woocommerce/order/order-again.php

    Outdated Templates: ❌


    Learn how to update

    ### Admin ###

    Enabled Features: activity-panels
    analytics
    product-block-editor
    coupons
    core-profiler
    customize-store
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    product-custom-fields
    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: minified-js
    new-product-management-experience
    pattern-toolkit-full-composability
    product-pre-publish-modal
    settings
    async-product-editor-category-field
    launch-your-store
    product-editor-template-system

    Daily Cron: ✔ Next scheduled: 2024-06-29 05:46:52 +01:00
    Options: ✔
    Notes: 30
    Onboarding: skipped

    ### Action Scheduler ###

    Complete: 1,540
    Oldest: 2024-06-28 10:48:47 +0100
    Newest: 2024-06-28 14:21:55 +0100

    Failed: 103
    Oldest: 2023-12-09 07:00:09 +0000
    Newest: 2024-06-28 08:58:02 +0100

    In-progress: 2
    Oldest: –
    Newest: –

    Pending: 31,667
    Oldest: 2024-06-28 00:26:12 +0100
    Newest: 2024-06-28 15:25:29 +0100


    ### Status report information ###

    Generated at: 2024-06-28 15:25:24 +01:00

    HPOS is fully enabled and migration mode is still active (back filling into posts) and the website is working fine from a read/write perspective outside of this issue.

    What I’ve done to try and identify/resolve the issue:

    • Repair tables (all successful.)
    • Run wp action-scheduler run (batch of 100, took over an hour to complete 14.)
    • Ran wp action-scheduler clean (clear all old actions.)

    Would appreciate any input?

    • This topic was modified 1 year, 9 months ago by gRoberts1984.
Viewing 1 replies (of 1 total)
  • Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @groberts1984

    The “Commands Out of Sync” error usually happens when multiple queries are being run simultaneously. This might be why your Action Scheduler takes longer than usual to complete tasks. Sometimes, it also happens when a plugin leaves a mess in database queries or does not close properly. As an initial troubleshooting step, you can try clearing the site and server cache and see if it helps.

    If this doesn’t make any difference, try disabling all other plugins except WooCommerce to see if there’s a conflict causing the issue.

    If the issue continues, I recommend contacting your hosting provider to check for any server-side issues that might be causing it. Especially check your corn setting. Sometimes, the hosting provider’s default configurations are not compatible with WordPress. In this case, you can use an alternative cron as shown here: https://muffingroup.com/blog/wordpress-missed-schedule/

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

Viewing 1 replies (of 1 total)

The topic ‘wc-admin_import_orders taking a long time, sometimes timing out’ is closed to new replies.