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

[eluser]xerosis[/eluser]
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.

Thanks.
#2

[eluser]cpass78[/eluser]
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..
#3

[eluser]xerosis[/eluser]
A quick fix is to make a cron job which just deletes all the ones which are older than a given timestamp, daily.
#4

[eluser]cpass78[/eluser]
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.
#5

[eluser]xerosis[/eluser]
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