• Resolved khushbu91

    (@khushbu91)


    Hello Again,
    I am getting some database errors, not sure what is triggering these, but these pop up randomly ever since we migrated to current host. I am not that tech savvy, had hired a coder who couldn’t identify the issues, and said since these aren’t fatal shouldn’t worry much, but I have my reasons to be worried. Any help appreciated.

    •  Jul 16, 18:14:26WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wpstg0_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
    •  Jul 16, 18:14:26WordPress database error Commands out of sync; you can’t run this command now for query SELECT a.action_id FROM wpstg0_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
    •  Jul 16, 18:08:28WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wpstg0_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
    •  Jul 16, 18:08:28WordPress database error Commands out of sync; you can’t run this command now for query SELECT a.action_id FROM wpstg0_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
    • Mark as fixed | Ignore Jul 16, 18:08:08WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wpstg0_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

    System Status Report

    ### WordPress Environment ###

    WordPress address (URL): [Redacted]
    Site address (URL): [Redacted]
    WC Version: 10.0.2
    Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.
    Action Scheduler Version: ✔ 3.9.2
    Log Directory Writable: ✔
    WP Version: 6.8.2
    WP Multisite: –
    WP Memory Limit: 1 GB
    WP Debug Mode: –
    WP Cron: –
    Language: en_US
    External object cache: ✔

    ### Server Environment ###

    Server Info: LiteSpeed
    Server Architecture: Linux 4.18.0-553.34.1.lve.el8.x86_64 x86_64
    PHP Version: 8.1.32
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 8.13.0
    OpenSSL/1.1.1w

    SUHOSIN Installed: –
    MySQL Version: 10.11.13-MariaDB-cll-lve
    Max Upload Size: 5 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔

    ### Database ###

    [REDACTED]

    ### Post Type Counts ###

    astra-advanced-hook: 3
    attachment: 8752
    custom_css: 4
    custom_order_status: 6
    custom-css-js: 3
    display_type: 7
    elementor_library: 6
    footer: 6
    megamenu: 3
    nav_menu_item: 37
    ngg_gallery: 2
    ngg_pictures: 136
    nomos_mapper: 6
    oembed_cache: 6
    page: 21
    post: 1
    product: 2689
    product_variation: 3194
    revision: 18
    shop_coupon: 1
    shop_order: 2448
    wcpa_pt_forms: 16
    wp_global_styles: 3
    wp_navigation: 1
    ziss: 1

    ### Security ###

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

    ### Active Plugins (20) ###

    Advanced Database Cleaner: by Younes JFR. – 3.1.6
    Advanced Woo Search: by ILLID – 3.38
    Astra Pro: by Brainstorm Force – 4.11.4
    Blackhole for Bad Bots: by Jeff Starr – 3.7.4
    Click to Chat: by HoliThemes – 4.25
    CompressX: by WPvivid Team – 0.9.29
    Simple Custom CSS and JS: by SilkyPress.com – 3.50
    Custom Order Status for WooCommerce: by Tyche Softwares – 2.8.0
    Elementor Pro: by Elementor.com – 3.30.0
    Elementor: by Elementor.com – 3.30.2
    Error Log Monitor: by Janis Elsts – 1.7.11
    XML Sitemap Generator for Google: by Auctollo – 4.1.21
    Health Check & Troubleshooting: by The ww.wp.xz.cn community – 1.7.1
    LiteSpeed Cache: by LiteSpeed Technologies – 7.2
    Side Cart WooCommerce: by XootiX – 2.6.8
    Advanced Shipment Tracking for WooCommerce: by zorem – 3.8.4
    WooCommerce Custom Product Addons Free: by Acowebs – 3.0.16
    Advanced Order Export For WooCommerce: by AlgolPlus – 4.0.3
    WooCommerce: by Automattic – 10.0.2
    WP STAGING WordPress Backup Plugin - Backup Duplicator & Migration: by WP-STAGING
    WPStagingBackup – 4.2.0


    ### Inactive Plugins (3) ###

    Temporary Login: by Elementor.com – 1.3.0
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels: by WebToffee – 4.7.8
    Woo Store Vacation: by MyPreview – 1.9.6

    ### Dropin Plugins () ###

    object-cache.php: LiteSpeed Cache - Object Cache (Drop-in)

    ### Must Use Plugins (3) ###

    Elementor Safe Mode: by Elementor.com – 1.0.0
    Health Check Troubleshooting Mode: by – 1.9.2
    WP STAGING Optimizer: by WP STAGING – 1.6.0

    ### Settings ###

    Legacy API Enabled: –
    Force SSL: –
    Currency: INR (₹)
    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: ✔
    Enabled Features: analytics
    marketplace
    order_attribution
    site_visibility_badge
    remote_logging
    email_improvements
    blueprint
    point_of_sale
    custom_order_tables


    ### Logging ###

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

    ### WC Pages ###

    Shop base: #5169 - /
    Cart: #5170 - /cart-2/ - Contains the woocommerce_cart shortcode
    Checkout: #5171 - /checkout-2/ - Contains the woocommerce_checkout shortcode
    My account: #5167 - /my-account-2/ - Contains the [woocommerce_my_account] shortcode
    Terms and conditions: ❌ Page not set

    ### Theme ###

    Name: Astra
    Version: 4.11.5 (update to version 4.11.6 is available)
    Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
    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
    Theme type: Classic theme
    WooCommerce Support: ✔

    ### Templates ###

    Overrides: –

    ### 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
    onboarding
    onboarding-tasks
    pattern-toolkit-full-composability
    product-custom-fields
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    printful
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    launch-your-store
    add-to-cart-with-options-stepper-layout

    Disabled Features: product-data-views
    experimental-blocks
    experimental-iapi-mini-cart
    experimental-iapi-runtime
    coming-soon-newsletter-template
    minified-js
    product-pre-publish-modal
    settings
    async-product-editor-category-field
    product-editor-template-system
    use-wp-horizon

    Daily Cron: ✔ Next scheduled: 2025-07-16 15:21:43 +05:30
    Options: ✔
    Notes: 240
    Onboarding: completed

    ### Action Scheduler ###

    Complete: 5,702
    Oldest: 2025-06-15 14:00:14 +0000
    Newest: 2025-07-16 13:17:06 +0000

    Failed: 72
    Oldest: 2024-11-10 02:55:57 +0000
    Newest: 2025-07-04 08:44:24 +0000

    Pending: 4
    Oldest: 2025-07-16 14:02:00 +0000
    Newest: 2025-07-17 11:07:57 +0000


    ### Status report information ###

    Generated at: 2025-07-16 19:08:02 +05:30
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    Thanks for sharing the error logs. The message “Commands out of sync; you can’t run this command now” typically comes from the database server (MySQL) when multiple queries are attempted in the wrong sequence or when a previous query hasn’t been properly completed before a new one starts.

    Since this kind of error can be influenced by the server environment (such as PHP timeout settings, database connection handling, or caching layers), I would recommend reaching out to your hosting provider and asking:

    • If there are any MySQL connection limits, timeouts, or caching configurations (e.g., LiteSpeed optimizations) that could interfere with WooCommerce’s batch processing or scheduled actions.
    • If they could help you increase the following PHP/server settings:
      • max_execution_time → at least 300
      • post_max_size32M or higher

    This should help reduce the likelihood of those database sync issues during WooCommerce’s background processes.

    Let us know what they say.

    Thread Starter khushbu91

    (@khushbu91)

    Hello,
    They asked me to edit these via Cpanel PHP Ini settings, I have inserted the values shown above, will report if any errors occur in future.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thanks for the update!

    That sounds good — editing the PHP INI settings via cPanel is a valid approach. Hopefully, that helps stabilize things. Please do keep an eye on it and feel free to reach out if any errors pop up again. We’ll be here to help if you need further assistance!

    Thread Starter khushbu91

    (@khushbu91)

    Hello,
    Had 3 errors last night

    •  Jul 18, 10:00:06Cron reschedule event error for hook: aDBc_clean_scheduler, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:”hourly”,”args”:[“Expired_Transients”],”interval”:3600}
    •  Jul 18, 00:39:46WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wpstg0_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
    •  Jul 18, 00:39:46WordPress database error Commands out of sync; you can’t run this command now for query SELECT a.action_id FROM wpstg0_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
    • This reply was modified 10 months, 3 weeks ago by khushbu91.

    Hi @khushbu91,

    Thanks for sharing the error logs.

    The first message (Cron reschedule event error) indicates that WordPress had trouble saving a scheduled task—this can sometimes happen due to a temporary database lock or lack of server resources.

    The other two errors are related to database command sync issues during shutdown, specifically when WooCommerce tries to process batch actions (like background tasks or pending batch processes).

    Since they started appearing right after the move to a new host, they’re likely connected to the new server environment—possibly due to database configuration, cron handling, or permission settings.

    We recommend reaching out to your hosting provider with these logs. They’ll be in the best position to check server-side settings and help resolve the underlying issue.

    Thank you.

    Thread Starter khushbu91

    (@khushbu91)

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I understand your concern. The link your hosting provider shared relates to fixing the database command sync issue you’re experiencing.

    Please follow the instructions in the two articles provided to help identify which plugin or setting might be causing the problem. Once you’ve found the culprit plugin, I recommend reaching out to that plugin’s support team for further assistance in resolving the issue.

    Thread Starter khushbu91

    (@khushbu91)

    I did not encounter any database errors today, didn’t change anything. But for some reason, my website has become painstakingly slow!

    Hi @khushbu91,

    Thanks for reaching out! If your site suddenly feels slow and you haven’t made any recent changes, it’s a good idea to check what might be happening behind the scenes.

    I recommend installing the Query Monitor plugin; it will help you see which database queries are taking the most time and if any specific plugin or theme component is causing delays.

    You can also run your site through Google PageSpeed Insights to get suggestions on what might be slowing things down from a front-end perspective.

    Let us know what you find!

    Thread Starter khushbu91

    (@khushbu91)

    I did raise a ticket, hosting company shared a video of them logging in to the admin panel and things running smoothly, while I struggle, I am not sure if my ISP or my IP is being filtered to make the site load slow?
    As I have changed 2 wifi spots but with the same ISP

    Thread Starter khushbu91

    (@khushbu91)

    Also the DB error is back

    •  Jul 20, 01:50:40WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM wpstg0_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
    • Mark as fixed | Ignore Jul 20, 01:50:40WordPress database error Commands out of sync; you can’t run this command now for query SELECT a.action_id FROM wpstg0_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

    Hi @khushbu91,

    Thanks for the detailed follow-up!

    Since the original database errors have returned and the site still feels slow on your end — while loading fine for your host — it’s possible there are two issues at play:

    1. The database sync error is still server-related and affects WooCommerce background processes. I’d recommend sharing the recurring log entries with your host again and specifically ask them to check the MySQL configuration, especially max_allowed_packet, caching layers, and persistent connections that could cause “commands out of sync” issues.
    2. Performance differences by ISP might point to a regional routing issue, firewall filtering, or DNS-level caching. You can try:
      • Testing with a different device or mobile hotspot from a different provider.
      • Flushing your local DNS or switching to a public DNS (like Google DNS or Cloudflare DNS).
      • Using tools like https://tools.pingdom.com or https://www.webpagetest.org to benchmark performance from other locations.

    Thank you. Let us know what you find out.

    Hi @khushbu91, we haven’t heard back from you in a while, so I’m going to mark this as resolved. If you have any further questions, please don’t hesitate to contact us here or start a new thread.

    We’d appreciate it if you could take a few moments to review the WooCommerce plugin using the link here: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

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

The topic ‘Database Errors’ is closed to new replies.