[Koha-devel] Koha sessions table is ridiculously huge
Galen Charlton
gmcharlt at gmail.com
Wed Feb 17 20:21:10 CET 2010
Hi,
2010/2/17 Clay Fouts <clay.fouts at liblime.com>:
> You can also use "truncate sessions" to do the job if you just want to clear
> out the contents of the table. It's faster and simpler than using mysqldump.
Also, in HEAD there's a little script to truncate sessions as well as
get rid of old zebraqueue entries. It's called
misc/cronjobs/cleanup_database.pl, and usage is
cleanup_database.pl --sessions --zebraqueue {# of days back to purge}
I don't think it's in the 3.0.x branch, but it should work in any
3.0.x database without modification.
> This issue arises from the fact that the way Koha is written, if a user just
> walks away from a session without logging out, their session data will hang
> out in the the sessions table forever. A proper solution would involve
> adding a timestamp column to the sessions table, enabling one to cull only
> expired sessions entirely within SQL statements. With the current schema,
> you'd have to parse the contents of each row within a user program, then
> cull based on the expiry contained within the session data itself.
I agree, this would be useful, either done within Koha itself or sent
to the maintainers of CGI::Session.
Regards,
Galen
--
Galen Charlton
gmcharlt at gmail.com
More information about the Koha-devel
mailing list