Hi. Sessions file not cleared in Debian 10. The problem seems to be that /var/www/clients/clientXX/webYYY/tmp does not get cleaned on all servers in cluster. Found this similar: https://www.howtoforge.com/communit...l-tmp-sessions-not-deleted.41752/#post-344256 But now i have websites with 2 million sess_xxxxxx in tmp/ and its hard to delete. This started after upgrade to Debian 10 in september 2019. I have /etc/cron.d/php that contains: 09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi Its running: Mar 2 13:39:01 mail11 CRON[5832]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi) Mar 2 13:39:03 mail11 systemd[1]: phpsessionclean.service: Succeeded. Mar 2 13:39:03 mail11 systemd[1]: Started Clean php session files. Anyone had similar error and solved it ?
For anyone else that have trouble deleting many files, this worked: cd in to tmp/, then run: find . -name "sess*" -delete
After trying hotfixing this on one node (not also master) i cant confirm that it works, still old session from yesterday. I did restart Apache2, but nothing else. Are there any extra steps to make it work ? Tried also to restart cron.service right now.
The code from the bugfix works fine, it uses find to delete only old session files, not all session files.
find . -mtime +1 -name 'sess_*' Gives me zero hits. Ok, from man: -mtime n File's data was last modified n*24 hours ago So code clears sess_* older than 24 hours ? Thats ok if working. Will try tomorrow again then.