• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved php sessions files not deleted under ubuntu

Brujo

Silver Pleskian
Plesk Guru
Ubuntu 16.04.4 LTS‬
Product Plesk Onyx Version 17.5.3 Update #42
Several versions of php handler

On my ubuntu system the /var/lib/php is fast growing with thousends of session files which does not get deleted, indeed there was so many files that rm was struggling to delete it at once.

Well I was able to do it manually and created a cronjob, but I am wondering which script - cronjob usualy takes care about to delete old session fles from /var/lib/php ?

I found something about in the KB but just for REL based Systems, but not for ubuntu,
 
had allready seen this, but it seems to be different under ubuntu 16.04

in cron.d there is
Code:
-rw-r--r--   1 root root   670 Mar  1  2016 php

# Look for and purge old sessions every 30 minutes
09,39 *     * * *     root   [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean

-rwxr-xr-x  1 root root 2918 Jun 22  2017 sessionclean

well I see that the cronjob runs every 30 min the sessionclean script in the syslog, but the session files did not get deleted in /var/lib/php
 
Back
Top