Support » Plugin: WP Session Manager » [Understanding Confirmation] Sessions, expiration and session.gc_probability

  • Resolved jschrab


    I would like confirmation that I am understanding the following correctly.

    While using WP Session Manager, I am seeing MANY stale sessions that do not delete themselves from the database. I am in an Ubuntu hosted environment where session.gc_probability is set to zero. This appears to be a default thing for Ubuntu/Debian. For those environments, expired session cleanup is done by way of a cron task – BUT those environments assume file-based sessions, not database sessions (such as WP Session Manager provides).

    For such a scenario, would I be correct that I need to do session cleanup for expired sessions myself? Probably a short cron task that calls DataManager::clean()?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eric Mann


    You are likely correct. The call would be something like:

    $handler = new \EAMann\WPSession\DatabaseHandler();

    That being said, doing this directly is entirely untested at the moment. I’ll queue up an issue on GitHub to add a cron cleanup for the DB handler directly to WordPress in the next release.

    • This reply was modified 1 year, 10 months ago by Eric Mann.
    Plugin Author Eric Mann


    I’ve resolved this in v4.1.0 by hooking in and setting up a cron job for you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Understanding Confirmation] Sessions, expiration and session.gc_probability’ is closed to new replies.