Sessions files not purged

(9clics) #1

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

(vipsoft) #2

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

(9clics) #3

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

(vipsoft) #4

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

(9clics) #5

Thanks for your answer, I’ll checking it

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

(vipsoft) #6

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).

(9clics) #7

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