In /etc/cron.d/php
, a cron runs that tries to execute /usr/lib/php/sessionclean
file which is suppose to clear sesssion files present inside /var/lib/php/sessions/
but its not clearing it.
Ideally php garbage collector runs via probablity as mentioned in /etc/php/7.2/apache2/php.ini
but Debian sets session.gc_probability = 0
and runs its own cron. For security reasons, Debian sets a tough permission on /var/lib/php/sessions/
folder and php gc access or perform delete hence debian runs a cron /etc/cron.d/php
as root.
But it seems, this script /usr/lib/php/sessionclean
is not working, a lot of expired session files are still there in /var/lib/php/sessions/
folder which keeps on growing and will eventually cause inode issue.
Any suggestion as why this is happening and how to fix it.