/tmp directory filling up fast

Discussion in 'General' started by HenrysCat, Mar 31, 2020.

  1. HenrysCat

    HenrysCat Member

    I have one site where the /var/www/clients/client1/web6/tmp directory is filling up fast, every few seconds a file is created, after a few days this directory was almost 4G, the only way I could remove them was to run ls -1 | xargs rm -rf from within the directory, but they are coming back fast, is this normal? will the system remove them eventually?
    Screenshot 2020-03-31 at 12.52.17.png
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    These are PHP session files, many files mean the site has many visitors. There was an issue in the cleanup code for the top dirs of the sites in ISPConfig which has been fixed in git-stable branch already.
     
    HenrysCat likes this.
  3. HenrysCat

    HenrysCat Member

    Thanks, I am on 3.1.15p3 is there a newer version?
     
  4. elmacus

    elmacus Active Member

    https://git.ispconfig.org/ispconfig/ispconfig3/issues/5510
    3.1.16

    Or fix it yourself until its released:
    Code:
    nano /usr/local/ispconfig/server/lib/classes/cron.d/200-logfiles.inc.php
    #find and change:
    #exec("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
    #to:
    $app->system->exec_safe("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
     
    HenrysCat likes this.
  5. HenrysCat

    HenrysCat Member

    Thank you sir
     

Share This Page