• Resolved twinkling

    (@twinkling)


    Good day,

    I encountered a problem with the database. Lately, there have been errors in the logs, and there is also a heavy load on the hosting. Most common error:

    WordPress database error Commands out of sync; you can’t run this command now for query SHOW FULL COLUMNS FROM o9023HaS_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

    Could you advice any actions I can do?

    Best regards,
    Aleksandrs.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey Aleksandrs 👋

    Thanks for reaching out!

    The error message you provided indicates a problem with database commands being out of sync, specifically related to the SHOW FULL COLUMNS query on the options table.

    This is a common cause of either a server’s memory being maxed out or caching issues.

    Could you move your store to a staging environment and turn off all caching plugins there? This will help us figure out if the issue is indeed related to caching. This can be done using the free WP Staging plugin.

    Cheers!

    Thread Starter twinkling

    (@twinkling)

    Hi Roxy!

    Thanks for reply.

    Forgot to mention that database constantly increasing its size. Usually it takes 3-4 days to reach the hosting limit, but sometimes it can reach limit in 24 hours.

    Ok, I will disable caching plugin (using LiteSpeed Cache).

    What next step should I do, or we should just wait some time for results?

    Best regards,
    Aleksandrs.

    Thread Starter twinkling

    (@twinkling)

    Small update: same error still appears in the error log after cache plugin was disabled.

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @twinkling,

    The persistent database error and the rapid increase in database size suggest a plugin or theme might be causing this issue. Even though you’ve disabled the caching plugin and the error still persists, it’s possible that another plugin or theme could be causing the problem.

    Can you please run a conflict test to help you identify the cause of the issue? More info: https://woo.com/document/how-to-test-for-conflicts/

    If the issue continues even after doing conflict testing, it would be best to contact your hosting provider and ask them to look into the issue. They may be able to provide more insights into what is causing the heavy load on your hosting and the database errors.

    Please let us know how it goes or if you need further assistance.

    Thread Starter twinkling

    (@twinkling)

    Hi

    I passed through conflict test and didnt found any incompatibility problems. Looks like theme and other plugins work good.

    Tried even to use default WordPress theme with only WooCommerce plugin switched on and DB still increase size. Only when WooCommerce plugin is disabled – problem solves.

    Yesterday database increased until 170GB in 3Hrs when the limit is only 3GB 🙁

    Do you have any more suggestions what I can try to do?

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @twinkling,

    This is certainly unusual and I understand your concern, especially given the rapid increase in database size.

    Can you please go to WooCommerce > Settings > Advanced > Features and disable “Order Attribution”, and also change Order data storage to either WordPress posts storage (legacy) or enable compatibility mode?

    After making this adjustment, can you please check whether the issue continues or not?

    Additionally, are there any other errors shown in WooCommerce > Status > Logs? Can you share them with us?

    Furthermore, are there any scheduled actions pending under WooCommerce > Status > Scheduled Actions? If there are a large number of pending actions, this could potentially cause a heavy load on your database.

    Looking forward to hearing from you soon.

    Thread Starter twinkling

    (@twinkling)

    Hi @shameemreza

    Yes, sometimes it’s stable for few hours and then starts increasing again. For example now DB increase is much slower than before, but RAM usage is higher.

    As you said I disabled “Order Attribution” and Order data storage was already in “WordPress posts storage (legacy)” because there is incompatible plugins with “High-performance order storage”. Also I enabled “compatibility mode”. But after all that I dont feel any changes, DB still have intensions to increase its size and RAM still have high usage.

    Sure, there is errors I found in WooCommerce log (same error repeats 9 times): “2024-02-25T18:17:43+00:00 CRITICAL Cannot redeclare true_shipping_single_product() (previously declared in /home/u352815552/domains/twinkling.lv/public_html/wp-content/plugins/insert-php/includes/class.execute.snippet.php(635) : eval()’d code:4) CONTEXT: {“error”:{“type”:64,”file”:”\/home\/u352815552\/domains\/twinkling.lv\/public_html\/wp-content\/plugins\/insert-php\/includes\/class.execute.snippet.php(635) : eval()’d code”,”line”:63},”backtrace”:[{“file”:”\/home\/u352815552\/domains\/twinkling.lv\/public_html\/wp-content\/plugins\/woocommerce\/includes\/class-woocommerce.php”,”line”:325,”function”:”critical”,”class”:”WC_Logger”,”type”:”->”},{“function”:”log_errors”,”class”:”WooCommerce”,”type”:”->”}]}”

    In Scheduled Actions I have 4 pending tasks: woocommerce_custom_orders_table_background_sync, omnivalt_location_update, woocommerce_cleanup_draft_orders (x2).

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @twinkling,

    From the error logs you’ve shared, it seems like there is a function called true_shipping_single_product that is being declared more than once, which is causing a critical error. This function appears to be used in a custom code, added to your site by the Insert PHP plugin.

    To address this, could you disable or remove this custom code and see whether the issue gets resolved or not?

    Regarding the high RAM usage and the database size issue, it’s possible that the pending tasks in your Scheduled Actions could be contributing to this. I recommend running these tasks manually to see if this helps reduce the load on your server.

    If the issue persists, it would be best to reach out to your hosting provider. They may be able to provide more insights into what is causing the high server load and the database errors.

    Let us know how that goes. Looking forward to hearing from you!

    Thread Starter twinkling

    (@twinkling)

    Hi @shameemreza

    Cleared error in true_shipping_single_product function, but no changes for website.

    Also tried to run Scheduled Actions manually. In the moment I didnt mention any changes, but after some time server load stabilized.

    I’m not sure if the stable operation is related to any of my actions because it has happened before that the site started working normally for a few days. I’ll see what happens next and I’ll write back to you about the results after a while.

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @twinkling,

    We’re happy to learn the server load has stabilized. Keep an eye on it, and let us know how it goes. You may also check with your hosting provider to learn more about what may be causing server spikes and storage issues.

    All the best,
    -Omar

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

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