• Resolved mazeness

    (@mazeness)


    Hello Woo/Automatic,
    first of all thank you for everything and for helping out.
    We use WooCommerce on several websites and, in the end, we always reach the goal!

    Lately we’re getting lots of Database Errors, all related to “Out of Synch”. And yesterday we reached a point where every few minutes the “Impossible to Enstablish Database Connection Screen” happened randomly, making the website unusable. This because tons of error where killing the DB and the Server.

    We did try yesterday night for 7h (we can’t do when Stores are open), and we tested WooCommerce without any plugin. The error in the log keeps showing them. If we also add WooPayments, this double up. Also, the Orders HPOS always ask to Synch new ones.

    We use latest version of WooCommerce (and WooPayments).

    Things We Did:
    – Repair Action Scheduler Plugin > But FAILED; it says talbe was obsolete.
    – Repaired/Optimized DB.
    – Fresh reinstalled WooCommerce, (and WooPayments in a second istance).
    – Disabled every possible plugin.

    Most Errors comes from:
    – BatchProcessingController
    – actionscheduler

    Any idea how we can fix it, or at least reduce them so our site won’t crash / use tons of resourses?
    Thank you in advance for the help!

    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM MZNSS_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
    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM MZNSS_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

    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT autoload FROM MZNSS_options WHERE option_name = '_transient_timeout_woocommerce_blocks_asset_api_script_data_ssl' 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

    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM MZNSS_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

    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM MZNSS_woocommerce_sessions made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Session_Handler->save_data

    [19-Jul-2024 09:04:36 UTC] WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM MZNSS_woocommerce_sessions made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Session_Handler->save_data, WC_Session_Handler->delete_session

    [9-Jul-2024 09:04:43 UTC] WordPress database error Commands out of sync; you can't run this command now for query INSERT INTO MZNSS_woocommerce_sessions (session_key, session_value, session_expiry) VALUES ('t_30f545cb9eb9905b9aeba7d509a57b', 'a:7:{s:4:\"cart\";s:6:\"a:0:{}\";s:11:\"cart_totals\";s:367:\"a:15:{s:8:\"subtotal\";i:0;s:12:\"subtotal_tax\";i:0;s:14:\"shipping_total\";i:0;s:12:\"shipping_tax\";i:0;s:14:\"shipping_taxes\";a:0:{}s:14:\"discount_total\";i:0;s:12:\"discount_tax\";i:0;s:19:\"cart_contents_total\";i:0;s:17:\"cart_contents_tax\";i:0;s:19:\"cart_contents_taxes\";a:0:{}s:9:\"fee_total\";i:0;s:7:\"fee_tax\";i:0;s:9:\"fee_taxes\";a:0:{}s:5:\"total\";i:0;s:9:\"total_tax\";i:0;}\";s:15:\"applied_coupons\";s:6:\"a:0:{}\";s:22:\"coupon_discount_totals\";s:6:\"a:0:{}\";s:26:\"coupon_discount_tax_totals\";s:6:\"a:0:{}\";s:21:\"removed_cart_contents\";s:6:\"a:0:{}\";s:8:\"customer\";s:742:\"a:28:{s:2:\"id\";s:1:\"0\";s:13:\"date_modified\";s:0:\"\";s:10:\"first_name\";s:0:\"\";s:9:\"last_name\";s:0:\"\";s:7:\"company\";s:0:\"\";s:5:\"phone\";s:0:\"\";s:5:\"email\";s:0:\"\";s:7:\"address\";s:0:\"\";s:9:\"address_1\";s:0:\"\";s:9:\"address_2\";s:0:\"\";s:4:\"city\";s:0:\"\";s:5:\"state\";s:2:\"MI\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:2:\"IT\";s:19:\"shipping_first_name\";s:0:\"\";s:18:\"shipping_last_name\";s:0:\"\";s:16:\"shipping_company\";s:0:\"\";s:14:\"shipping_phone\";s:0:\"\";s:16:\"shipping_address\";s:0:\"\";s:18:\"shipping_address_1\";s:0:\"\";s:18:\"shipping_address_2\";s:0:\"\";s:13:\"shipping_city\";s:0:\"\";s:14:\"shipping_state\";s:2:\"MI\";s:17:\"shipping_postcode\";s:0:\"\";s:16:\"shipping_country\";s:2:\"IT\";s:13:\"is_vat_exempt\";s:0:\"\";s:19:\"calculated_shipping\";s:0:\"\";s:9:\"meta_data\";a:0:{}}\";}', 1721552675)
    ON DUPLICATE KEY UPDATE session_value = VALUES(session_value), session_expiry = VALUES(session_expiry) made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Session_Handler->save_data
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello mazeness,

    Thank you for reaching out to Woo support.

    I understand you’re encountering an error message “WordPress database error Commands out of sync” on your site.

    This type of error can be caused by a few common reasons:

    1. The cache plugin might not be functioning properly.
    2. The PHP memory limit could be reached.
    3. There might be an incomplete query in a plugin or theme.

    When you disabled all possible plugins, which ones were still active?
    Would you mind trying to deactivate all plugins (including server-side cache) and switching to a default theme like Twenty Twenty-Four?

    If this isn’t possible on the live site, creating a staging site could be a good alternative.

    Looking forward to your response. ??

    Best regards.

    Thread Starter mazeness

    (@mazeness)

    Hello @doublezed2 !

    1. No Cache Plugin is on.
    2. PHP Memory config is always the same, and it’s a lot.
    3. We are running only WooCommerce, nothing more. That’s the problem!!

    What we’re trying now is to downgrade even PHP to 7.4 (we’re on 8.0 rn).

    Error happens randomly.. we really have no clue!
    Meanwhile we’re manually backupping products, clients, orders and building a fresh one if we can’t resolve this.

    Thanks for sharing your tips, appreciate!

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello mazeness.

    Thank you for your reply.

    That is a strange problem and the fact that it happens randomly makes it even stranger.

    Before you start building a fresh site, I recommend you migrate this site to a different server and check the site there. Just like a staging site with a different domain but an exact clone of the main site.

    We are not able to replicate this issue on our test sites.
    We have also not received any other reports with a similar problem.
    So I suspect the server settings and environment.

    Lastly, may I review your site’s System Status Report?
    You can find it via WooCommerce > Status.
    Select Get system report and then Copy for support.

    Once you’ve done that, you can paste the text in https://gist.github.com
    After that, you can paste the Gist link here in your reply.

    This report contains all the server and WP details.
    It might provide some insights into the problem.

    Looking forward to your response. ??

    Best regards.

    Thread Starter mazeness

    (@mazeness)

    Hello @doublezed2 ,
    we finally fixed it and we wanna share what was the problem, so it might help also other.

    The problem was 1 order currently open (processing) that was causing the issue.
    We don’t know why, but as soon as we processed that order, everything went back to normal without any error.

    The order was 5 month old (it’s a backorder), it was there before we switched to HPOS, it was the only processing order we had before switching the system.

    Somehow it was recalling function in the DB non-stop.

    Thank you for helping and I hope this can also help others!
    Cheers!

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello mazeness

    Thank you for your reply.

    I am glad to know that you have found a solution to this problem.
    Excellent work there!

    I appreciate your willingness to share the solution here and help the Woo community. ??

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help.

    Best regards.

    doodlewarriors

    (@doodlewarriors)

    Hello @mazeness

    I am really happy that I am seeing this thread, because we are having the exact same issue and it’s giving me hope.

    We’ve been troubleshooting for the last 3 months and hired multiple developers who can’t seem to help.

    Could you please explain what you mean by “processed that order”?
    Did you move it from pending payment to “Processing” or some other status?

    Cheers!

    Thread Starter mazeness

    (@mazeness)

    Hi @doodlewarriors , we manually changed the order status to completed. That order had embed some broken plugin config/meta for sure. Maybe some preorders features.

    But as soon as we changed to completed, site went back working prefectly

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.