Skip to main content

How does cPanel remove session expired files

Comments

3 comments

  • cPanelMichael
    Hello, The removal of expired sessions is not a value you can adjust, and is handled directly through cpsrvd. If inodes are a concern, have you checked to see which directories are using the most files? Here's a useful command you can use to check:
    cd / echo "Inode usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"
    Thank you.
    0
  • SysNet
    Hi there, thanks so much. Is after 24 hours the sessions delete? Another, Does this code in:
    package Cpanel::Config::Session; our $SESSION_EXPIRE_TIME = ( 60 * 60 * 24 );
    Location: /usr/local/cpanel/Cpanel/Config/Session.pm And this others files: /usr/local/cpanel/Cpanel/Session/* (all files from this folder) The previous code and all files are there related to cpsrvd, and work together ?
    0
  • cPanelMichael
    Hello, The session files associated with a user within /var/cpanel/sessions/raw and /var/cpanel/sessions/cache are automatically removed when the user clicks on the "Log Out" button within cPanel or WHM, or during other actions such as password changes. The files remain if the user simply closes the browser window and chooses to not click on "Log Out". If you wanted to remove the remaining files sooner, then you'd need to setup a cron job to manually remove those files from the corresponding directories. As far as /usr/local/cpanel/Cpanel/Config/Session.pm, that file servers multiple purposes. I don't recommend manually editing this file. Is there a particular concern you have about session management? Thank you.
    0

Please sign in to leave a comment.