• Resolved vesperios

    (@vesperios)


    Hello,

    I am running WooCommerce on a LiteSpeed Server. I am facing a persistent and critical database error that crashes my site’s cron jobs and WooCommerce background processes.

    After extensive debugging (disabling all other plugins), I caught the error in my debug.log explicitly pointing to LiteSpeed Cache during the shutdown hook.

    The Log Entry (Dec 01):

    [01-Dec-2025 20:42:45 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 = 'woocommerce_cart_page_id' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed\Core->send_headers, LiteSpeed\Control->finalize, do_action('litespeed_control_finalize'), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed\Thirdparty\WooCommerce->set_control, wc_get_page_id, get_option
    

    My Configuration:

    • Server: LiteSpeed Enterprise
    • Plugin: LiteSpeed Cache (Latest Version)
    • Object Cache: OFF (I have verified this setting is disabled, yet the error persists).
    • LQIP Cloud Generator: OFF

    The Issue: It seems that LiteSpeed\Control->finalize is triggering a query (via LiteSpeed\Thirdparty\WooCommerce->set_control) while the database connection is unstable or busy closing, causing a “Commands out of sync” chain reaction that kills all subsequent WooCommerce Scheduled Actions.

    Since I am on a LiteSpeed Server, I really want to keep using your plugin. Is there a way to prevent set_control from firing during shutdown, or is this a known conflict with specific MySQL configurations?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    I think this means the LSCWP is the victim , not the culprit

    break down the log , it means , during the last step of request , LSCWP try to get the page ID of “cart page” , to give a no-cache response header , since by default we don’t cache checkout , cart and my-account page

    during this query wp_options WHERE option_name = 'woocommerce_cart_page_id' something else that has already shutdown or kill the database connection for whatever reason , so this query breaks , just like you have already stated , ” database connection is unstable or busy closing”

    on this case, I think you need to figure out what was closing the database connection prematurely

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.