• Resolved mansooryusaf

    (@mansooryusaf)


    From last couple of days i am observing a high spike in disk usage for mysql. I see that wp_options tabel is the main cause. If found that related products transients are generting contonously and that might be the reason. following is an example

    _transient_wc_related_8783
    _transient_timeout_wc_related_8783

    there are series of rows being generated. In just one day wp_options table size reaches 5GB.

    Can anyone help how to fix this. My wordpress and woocommerce are on latest version.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @mansooryusaf

    I understand that in your wp_options table the related products transients are generating continuously and in just one day the table’s size is reaching 5GB.

    Please install the WP-Optimize plugin and use it to remove the transients, and then optimize the table. Simply deleting rows will not reduce the table size, it will only reduce the number of rows. MySQL just marks deleted rows as deleted and doesn’t physically remove them. You need to optimize the table to do that.

    You can also try the solutions shared in these threads/articles to see if it works in your case:
    https://wordpress.stackexchange.com/questions/369578/huge-wp-options-table
    https://pixl.my/fixed-wp_options-table-is-huge-for-no-reason/
    https://kinsta.com/knowledgebase/wp-options-autoloaded-data/

    Thread Starter mansooryusaf

    (@mansooryusaf)

    I spend 1 week and did all optimizations as you mentioned using wp optimize and following the guides you mention in these links particularly kinsta. In addition I used advanced db cleaner pro plugin. Wp Optimize, advanced db cleaner and phpymyadmin optimize table all of them instantly reduced table size to 12MB from 5GB. but in few minutes wp_options table grows to 200MB and in 1 hour from 1.5 to 2GB and keep growing.

    Thread Starter mansooryusaf

    (@mansooryusaf)

    these are the database size detail as guide of kinsta for top 10

    name value
    autoloaded data in KiB 1956
    autoloaded data count 4142
    wpseo_taxonomy_meta 228817
    rewrite_rules 224211
    widgetopts_global_taxonomies 183379
    wpseo-premium-redirects-export-plain 89350
    asp_updates 55128
    p3_scan_scan_2020-12-31_8ff23f1c 54418
    wphb_scripts_collection 52815
    wpseo_titles 47178
    duplicator_pro_package_active 42044
    wphb_styles_collection 38004

    Mirko P.

    (@rainfallnixfig)

    Hi @mansooryusaf,

    Thanks for getting back to us.

    The main point you should focus on is which tool is generating such an amount of transients on your database. With the help of your host’s support team, you can monitor the server logs and use other server tools trying to pinpoint the culprit of this non-typical flow.

    If you have any other questions please do let us know.

    Thread Starter mansooryusaf

    (@mansooryusaf)

    I found the glitch. It was wprocket optimize css (rucss) feature which was calling woocommerce scripts repeatedly. The cron autoscheduler job for wprocket was stuck in wp_actionscheduler_actions. I clear the cron using command "UPDATE wp_options SET option_value = '' WHERE option_name = 'cron';" and all went well. It took my 10 days to diagnose and fix the job. Thanks.

    Thread Starter mansooryusaf

    (@mansooryusaf)

    The another culprit was asset cleanup pro where I disabled different scripts on different pages. I disabled asset cleanup pro and my issue is completely resolved. I will reactivate asset cleanup pro later and try to find out the issue.

    Thread Starter mansooryusaf

    (@mansooryusaf)

    I reactivate asset cleanup pro and wp_options size start growing. With some additional workout there were two facebook pixels plugin running. I disabled additional “Facebook for wordpress” plugin and now wp_options is 100% fixed.

    • This reply was modified 2 years, 6 months ago by mansooryusaf.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘wp_options table growing fast in size’ is closed to new replies.