can I set gc_probability to 0 and have this nightly script to cleanup the old sessions? Is this a safe/good way to do this? Or should I just let fuelphp do his work?
#!/bin/bash
max=7 tmpdir=/tmp/session
find ${tmpdir} -type f -name '*' -mtime +${max} -delete
If you have enormous amounts of sessions it is even advised to do it manually, as it might have a protential performance hit on the frontend (apache) if gc kicks in.
You have to find the balance on when to do it, obviously when using file based sessions, the more files you have in a single directory, the slower the I/O tend to get.