• Resolved ImageRobmcclel

    (@robmcclel)


    I use your plugin to govern a custom group creation process in BuddyPress and I’ve recently started experiencing some issues during the nightly backups. On investigation, my wp-options table has grown to, no kidding, millions of rows of entries — 99% of them are sessions.

    My issue is multiple: Why is this happening? How can I prevent or mitigate this kind of database bloat? Can I just delete these millions of entries?

    My version of wp_session is 1.2.2. I’m using Redis for Cache.

    Thanks,
    Rob Mc

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sounds like:

    1. The cleanup process isn’t running (there is a cron job that should delete expired sessions every hour). If that’s not running, expired sessions never get garbage collected.

    2. If it is, it can’t keep up with the amount of session being created (it defaults to cleaning up 1000 sessions per hour). If your cron is not running every hour… it may not be able to keep up.

    There’s a filter wp_session_delete_batch_size to adjust this number here:
    https://github.com/ericmann/wp-session-manager/blob/master/includes/wp-session.php

    • This reply was modified 8 years, 9 months ago by ImageNick Ciske.
    Plugin Author ImageEric Mann

    (@ericmann)

    Version 2.0 introduced a custom database table to keep sessions entirely out of the options table. I’d suggest upgrading to the latest version (v3.0.2 at the time of this writing) to leverage the enhanced performance that custom table gives you.

    I’d also suggest configuring your backups to <i>not</i> back up the custom table at all.

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

The topic ‘I Have A Massive Amount of Sessions in wp-options’ is closed to new replies.