• Hello,

    When using the plugin I got a loooot of the following errors on Debug.php

    [04-Aug-2023 15:38:40 America/Santiago] WordPress database error Commands out of sync; you can't run this command now for query INSERT INTO wp_options (option_name, option_value, autoload) VALUES ('_transient_timeout_yith_wcan_products_instock_1691177869', '1693769920', 'no') ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload) made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCAN_Cache_Helper::update_transients, set_transient, add_option

    How could I fix them.
    Woocommerce last version
    WordPress last version
    Caché: Wp Rocket

    Best regards!

    • This topic was modified 1 year, 7 months ago by svenms.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well :D.

    Try to go to WooCommerce > Status > Tools and Clear Product Filter transients

    In this way, the transients will be cleared in your DB and maybe it can fix the problem with the duplicated key.

    Please, try it and let me know.

    Have a good day.

    Thread Starter svenms

    (@svenms)

    Hello,

    Now it gives:

    [07-Aug-2023 12:25:19 America/Santiago] WordPress database error Commands out of sync; you can't run this command now for query UPDATE wp_options SET option_value = '1694017519' WHERE option_name = '_transient_timeout_yith_wcan_queried_products_1691424752' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCAN_Cache_Helper::update_transients, set_transient, update_option
    [07-Aug-2023 12:25:19 America/Santiago] WordPress database error Commands out of sync; you can't run this command now for query UPDATE wp_options SET option_value = 'a:28:{s:32:\"b0a8c3901313c58b994419ba82f76f03\";a:476:{i:0;i:91941;i:1;i:91523;i:2i:21;i:21098;i:22;i:21096;i:23;i:21093;i:24;i:7746;i:25;i:7742;i:26;i:5403;i:27;i:5395;i:28;i:5393;i:29;i:5390;i:30;i:5385;i:31;i:5382;i:32;i:5380;i:33;i:5378;i:34;i:5375;i:35;i:5373;i:36;i:5368;i:37;i:5387;i:38;i:5364;i:39;i:5362;i:40;i:5359;i:41;i:4840;i:42;i:2443;}s:32:\"45afc7f3a62199a948d9381f11a9f0ec\";a:1:{i:0;i:2725;}s:32:\"cdd10f7841d8a9a2952fadd28a1b7a12\";a:1:{i:0;i:4403;}s:32:\"6242cc7ea70a2c3fdc576644c7cb63ca\";a:7:{i:0;i:74339;i:1;i:74085;i:2;i:74065;i:3;i:64042;i:4;i:63694;i:5;i:48266;i:6;i:48142;}}' WHERE option_name = '_transient_yith_wcan_queried_products_1691424752' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCAN_Cache_Helper::update_transients, set_transient, update_option
    [07-Aug-2023 12:25:19 America/Santiago] WordPress database error Commands out of sync; you can't run this command now for query UPDATE wp_options SET option_value = '1694017519' WHERE option_name = '_transient_timeout_yith_wcan_object_in_terms_1691424752' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCAN_Cache_Helper::update_transients, set_transient, update_option

    The second option_value value was really large so I cut some of the code so it fits better here.
    PS: Our site has about 1000 products and around 3600 including variations.

    • This reply was modified 1 year, 7 months ago by svenms.
    Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well :D.

    Try to add the following code in the functions.php of your active theme

    add_filter( 'yith_wcan_suppress_cache', '__return_true' );

    It should disable the cache section of our plugins and prevent to execute the transients.

    Please, try it and let me know.

    Have a good day.

    Thread Starter svenms

    (@svenms)

    It does work, but of course disables yith cache.
    Would it be any way to make cache work without having this kind of DB errors?

    Best regards!

    Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well ??

    Usually the problem with the transient could happen if you have many many filters in the preset. In that case, a system cache is negative because it retrieve an huge iption in the db.

    Could you please tell me how many filters you have configured?

    In that case maybe the code to cancel the cache will be the solution.

    I’m looking forward your response.

    Have a good day.

    Thread Starter svenms

    (@svenms)

    I see.
    We have 3 Filters. Two of them with just 3 subfilters and one with 8 subfilters.
    We do have around 3000 SKU, including products and variations.

    Plugin Support Giuseppe Madaudo

    (@askmagic)

    Hi there,

    this also could depend by the machine where the website is hosted.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Commands out of sync DUPLICATE KEY UPDATE DB’ is closed to new replies.