Welcome Guest, Not a member yet? Register   Sign In
CI Sessions on database

I am storing sessions on my database using CI.

The issue is that it seems CI does not delete them ever, and now this table is becoming enormous. Is there anyway it can actually delete sessions which have been inactive for quite some time or somehow clean up the table?

I am sure many of the sessions are quite old an irrelevant.


Ive been having the same trouble since day one and have pretty much chalked it up to "Cant be bothered with finding a fix for it right now" Confused Whats funny is im the only one using the site at the moment and even though trying to get the site from sources other than me produces the forbidden page, its still logging sessions.

Ive en set my $config['sess_time_to_update'] = 10; but still there are empty sessions in the db..

A quick fix is to make a cron job which just deletes all the ones which are older than a given timestamp, daily.

Yes that has been toyed around with but honestly its just another process that shouldnt need to be running. garbage collection should work as intended should it not.

Yes I know. That is actually why I posted this thread hoping it does not reach the point where I need to actually write that cron job! I am sure there is a proper answer to this question.

Theme © iAndrew 2016 - Forum software by © MyBB