Users /.cagefs/opt/alt/php74/var/lib/php/session filled with 400-500k files
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Morten
  2. 21.09.2020
  3.  Subscribe via email

I tried running tmpwatch manually but nothing happend:

[email protected]:~# cagefsctl -v --tmpwatch
[email protected]:~# du -h /home/username/.cagefs/opt/alt/php74/var/lib/php
1.9G /home/username/.cagefs/opt/alt/php74/var/lib/php/session
1.9G /home/username/.cagefs/opt/alt/php74/var/lib/php

So I manually edited /etc/cagefs/cagefs.ini and added that folder:
tmpwatch = /usr/sbin/tmpwatch -umclq 72

Then I ran tmpwatch again manually and then files where cleaned:
0 /home/username/.cagefs/opt/alt/php74/var/lib/php/session

Why are these files/folders not cleaned automatically?
I also checked docs here:

But I cannot see what we're missing.
Rate this post:
  1. 21.09.2020 09:09:09
  2. # 1
Sergey Khristich Accepted Answer
Posts: 504
Joined: 20.05.2019
Hello Morten,
Thank you for reaching out! In the dock you followed it states:
"For cPanel servers, CageFS version 6.0-42 or higher performs cleaning of PHP sessions based on session.gc_maxlifetime and session.save_path directives specified in proper php.ini files."
In this case, you need to check which version of Cagefs you have on the server, if 6.0-42 or higher, then you need to check the value of the session.save_path variable
in /opt/alt/php74/etc/php.ini - maybe it is not equal to /opt/alt/php74/var/lib/php/session, so those session files were not cleaned by the crown.
It would be better if you create a ticket here and technical experts will help you asap.
Thank you for contacting us.
Marketing Manager
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

EU e-Privacy Directive

This website uses cookies to ensure you get the best experience using our website and services. If you prefer we don’t use cookies, please disable them in your browser.

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.