Hi - my sessions table is filling up quite quickly. While I do have sufficient space to carry on for a while, what would be the impact to wiping out some of that stored data? Returning visitors who had items to their cart may not see their "carted" items any more? Trying to size the impact before I do anything bad
Thanks!
Sessions table
-
- Lead Developer
- Posts: 2657
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: Sessions table
By default, all sessions that are older than maxlifetime are supposed to get cleared whenever the garbage collector runs. See https://github.com/CE-PhoenixCart/Phoen ... ns.php#L45
If the garbage collector settings from php.ini are not working correctly, it should be harmless to runin phpMyAdmin or wherever. This is supposed to happen on some regular basis. It shouldn't affect returning visitors, as they should get new session IDs regardless. The problematic deletion would be visitors who currently have their browser open. Hopefully there aren't that many visitors who have their browser open for more than a week between visits.
Because the database date and the server date may be different, I don't know that it would be a good idea to set the interval to less than 3 DAY. 1 WEEK or 1 MONTH or 1 YEAR should be fine. You might try starting with the longest interval and seeing how much that helps. You can then decrease down step-by-step to a week if not.
If the garbage collector settings from php.ini are not working correctly, it should be harmless to run
Code: Select all
DELETE FROM sessions WHERE expiry < NOW() - INTERVAL 1 WEEK
Because the database date and the server date may be different, I don't know that it would be a good idea to set the interval to less than 3 DAY. 1 WEEK or 1 MONTH or 1 YEAR should be fine. You might try starting with the longest interval and seeing how much that helps. You can then decrease down step-by-step to a week if not.
-
- VIP Member
- Posts: 483
- Joined: Fri Oct 25, 2019 5:06 pm
- Has thanked: 48 times
- Been thanked: 28 times
Re: Sessions table
there is add-on (Session Expiration Control) made for older version of Community Bootstrap Edition (BS Edge) by Demitry , to allows the store owner to manage their admin panel's session expiration, as well as the customer's session expiration via Admin>Configuration>Sessions.
I didn't test on Phoenix also it's need some core change,,
I didn't test on Phoenix also it's need some core change,,