PHP session files not cleaned up

Discussion in 'ISPConfig 3 Priority Support' started by Jemt, Sep 23, 2020.

  1. Jemt

    Jemt Member HowtoForge Supporter

    Hi,

    I have millions of old PHP session files in my websites' tmp directories.
    E.g. /var/www/clients/client10/web75/tmp

    I noticed that there is a PHP cronjob that should take care of this:
    /usr/local/ispconfig/server/lib/classes/cron.d/200-logfiles.inc.php

    How can I debug the problem? Can I somehow invoke these cronjobs manually?

    What can be the cause of the problem? Is the cronjob not called or failing?
    This is a server that initially started on Debian 7 with ISPConfig 3.x.
    Today the server is running Debian 10 with ISPConfig 3.1.15p3.

    - Thanks

    /Jimmy
     
    Last edited: Sep 23, 2020
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If I remember correctly, there was an issue with not cleaned up session files but this has been resolved in 3.1 beta version. I don't recommend updating production systems to 3.2 yet, but you might get the latest logfiles plugin, which is doing the session cleanup as well, and copy it onto your server:

    https://git.ispconfig.org/ispconfig...erver/lib/classes/cron.d/200-logfiles.inc.php

    the file needs to be copied to:

    /usr/local/ispconfig/server/lib/classes/cron.d/200-logfiles.inc.php
     
    Jemt likes this.
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  4. Jemt

    Jemt Member HowtoForge Supporter

    Thanks, @till and @Th0m .
    Till, how can I invoke the script to test that it works ?

    Jimmy
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Do you mean the script that I wrote? If so, why not ask me?
     
  6. Jemt

    Jemt Member HowtoForge Supporter

  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can upgrade to git-nightly, but we are still fixing some bugs so I wouldn't suggest doing that. Wait for 3.2 to come out or use the script from Taleman.
     
  8. Jemt

    Jemt Member HowtoForge Supporter

    @Th0m: Let me clearify; I just want to manually run the cron-job @till provided from the command line, so I can verify that it works. I have no problem cleaning out the session files myself. I just want to make sure that the updated cronjob I'm about to install works.
    I believe I once stumpled upon a command that lets us trigger these cron jobs manually - I just don't remember how :)
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    php /usr/local/ispconfig/server/cron_debug.php --cronjob=CRONJOBNAME.inc.php

    You can copy the change from https://git.ispconfig.org/ispconfig/ispconfig3/-/merge_requests/946/diffs
     
    Jemt likes this.
  10. Jemt

    Jemt Member HowtoForge Supporter

    Perfect, exactly what I was looking for. Thanks, @Th0m :)
     

Share This Page