As documented elsewhere, there are some php configs where gc_probability is set to 0 (notably debian).
The eZ session table will then grow continuously over time, and when the sysadmin sees that and clicks on "clean expired sessions" in the admin interface it is too late: deleting 3M rows from a table which is in constant use does not bode well with Mysql - most likely result is a very slooow ez for a couple of hours, followed by a rollback - and the table keeps growing...
Solution: delete the expired sessions X rows at a time, committing after every chunk (eg 1000 or 10000).
In order to do this:
- modify ezsession.php as per the attached file
- add an ini settings which specifies after how many session rows a commit should happen. I'd say 10000 is a good starting point, but of course admins can tune it according to their load
- modify module setup/session to pass the new ini param to eZSessionGarbageCollector()