• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database sessions and garbage collection

#1
Hello CI community,
First of all thank you for the great framework and the support afterwards.

I've recently updated our application to CI3 and almost everything is working as expected except the sessions.
First, let me describe my situation..

My session configuration:
PHP Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'dk_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 0// !!
$config['sess_regenerate_destroy'] = FALSE

It's worth mentioning that I have an extra column `user_id`(int 20) in the `sessions` table to easily identify my online users.

The problem:
Expired(garbage) sessions are never deleted(collected) from the database -> thus making 'expired' users appear online and only 2 days after going to production i already have the sessions table with 5K+ records..

So no garbage collection for database sessions since CI3 or i'm missing something?

Thanks in advance for your help!
Reply


Messages In This Thread
Database sessions and garbage collection - by kozzleto - 03-08-2015, 09:34 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.