Welcome Guest, Not a member yet? Register   Sign In
Session library not garbage collecting
#1

I have a site that is built on CI bonfire, running CI 3.1.6.

It's a popular site and uses the filesystem for session management, however it appears that the garbage collection, that should be deleting the old session files is not working as it should be. As a result we've ended up with a session directory totalling 1.5GB of session files, which we have estimated to number over 26 million!

As a solution for the moment a tmpfs mount point has been created for the sessions as writing that many files with that frequency to a physical disk can't have been doing it any good whatsoever. In addition to that I have written a shell script to delete and session files older than 4 hours.

This last fix feels like a bit of a hack for what I think CI should have been doing automatically.

The session settings are as follows:

$config['sess_cookie_name'] = 'bf_session_';
$config['sess_expiration'] = 7200;
$config['sess_time_to_update'] = 300;
$config['sess_match_ip'] = false;
$config['sess_driver'] = 'files';
$config['sess_regenerate_destroy'] = true;
$config['sess_save_path'] = 'sessions';

Has anyone experienced that same and if so what was your solution? Is the CI session management broken?
Reply


Messages In This Thread
Session library not garbage collecting - by jhob - 01-26-2020, 04:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB