• Resolved millo_2k

    (@millo_2k)


    Hi there,

    I have a huge database that I want to make smaller (750mb), having had a look the problem seems to be in wp_woocommerce_sessions (which is about 680mb). What does this do? Can I empty it? How can I stop it being so large again?

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @millo_2k You can go to WooCommerce > Status > Tools and there is a button there to clear customer sessions. This should remove all sessions from the database.

    These should automatically be being cleared. Is WordPres Cron working/enabled on your site? Under WooCommerce > Status, it should have a green checkmark in the first section. If this is not working, it could be part of the problem.

    Kenin

    (@kbassart)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thank you for your advice. It worked 10000%!!

    torbent

    (@torbentschechnegmailcom)

    Hello,
    I have the same problem – I disabled the WP_CRON in the wp-config.php, but I did set up a cronjob that calls this script every 15mins:

    #!/bin/sh
    wget -O - -q "https://www.domain.com/wp-cron.php?doing_wp_cron" > /dev/null
    exit 0

    But this one does not clear the wp_woocommerce_sessions table?

    Thanks.

    WPChina

    (@wordpresschina)

    I spoke with Woocommerce support yesterday about this same problem. I previously used WP CRON and after a couple weeks when that failed to clear the wp_woocommerce_sessions I disabled WP CRON and used a server-side cronjob. But over the past 26 hours my table has gotten big again. It gets about 1 megabyte every 15 minutes, so I usually have about 100mb after 1 day.

    Woocommerce support didn’t give me much help. They said I should install the WP Control plugin to monitor my cron. My cron is working fine and other plugins are working fine.

    torbent

    (@torbentschechnegmailcom)

    @wpchina: I spoke to WooCommerce support as well. I think the only solution is to handle sessions via Redis.

    WPChina

    (@wordpresschina)

    @torbentschechnegmailcom how can Redis solve it?

    Is there a URL we can manually hit via a cronjob to clear the sessions?

    WPChina

    (@wordpresschina)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Huge database – wp_woocommerce_sessions’ is closed to new replies.