Sessions files not purged

Hello All,

I’ve installed Piwik some monthes ago, and after a server change, I’ve noticed that the /tmp/sessions is full of files (some of them are very old).
So, maybe, it’s possible to delete some of these files, for performance purpose of course ?

Thanks in advance for your answers.

Regards, Alex

These are configured for your web server. See: php.ini’s session.gc_probability, session.gc_divisor, and session.gc_maxlifetime.

Thanks for your answer, but it seems that all is configured the right way :
session.gc_divisor = 100
session.gc_maxlifetime = 1440

Your web server user probably doesn’t have permissions to delete files. Check your umask and file/directory permissions.

Thanks for your answer, I’ll checking it

PS : I don’t know why I didn’t received any notification of your answer :frowning:

You’ll also want to check session.gc_probability is non-zero (which I mentioned in my first reply but omitted in your response). It seems Debian (not sure about derivatives) ships with this unset (thus, treated as zero, 0) … meaning garbage collection never runs (regardless of gc_divisor).

Thanks a lot, this parameter was not set, and now it works.