Can I empty elgg_users_sessions table? Too big!

Hello

My elgg users_sessions table become too big. I repair everytime. Simply may I empty truncate it on PHPmyadmin? Harmful?

Thank you

  • PHP should clean up outdated entries automatically. Make sure that these session options have been configured properly on your server:

    • session.gc_probability
    • session.gc_divisor
    • session.gc_maxlifetime

    See: http://php.net/manual/en/session.configuration.php#ini.session.gc-probability

  • Some old discussion postings seem to indicate that you can empty (not delete) this table - but I can not give ANY advice here by own experience! Maybe it's best to backup the database before trying this out. Emptying the table would also result in all users getting logged out.

    Possibly it's a php.ini setting resulting in the table getting so big. It might help to set the php variable session.gc_probability to 1 for some php garbage collection. But I can't give some definite advice here either as the garbage cleanup done by php might be working differently on different servers.

  • Thank you Juho, Thank you iionly. I try your advice.