A question about giant files in .cagefs/tmp folder on shared hosting
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. M. Martin
  2. Tuesday, 11 December 2018
  3.  Subscribe via email
Hi there

I'm quite new to this, no profi and so request you to bear this mind.
I have been using Cpanel at different web hosts for many years to manage mostly small sites, all on shared servers.

An example is the Germany-based current host, where I have 3 small sites sharing a 50GB account, 2 of which are add-on domains, 2 Wordpress, 1 Drupal based.

They have, ever since I moved them together about a year ago been taking up mostly less, but not too long ago at most 33% of this space.

About 2 weeks ago, I noted more or less by accident that the usage of disk space had jumped to 40%, although I have added no content & if so not more than a few hundred MBs. Today it's almost 52%.
After looking around in Cpanel for what could be using up this space, I came across some strange files in the folder .cagefs/tmp, some of which, as you see in the screenshot are between 2.5 & 2.8GB (!!) and below them, apparently probably hundreds of 0 byte files, which seem to be created constantly.

Since I have never had anything like this, or at least noticed it, I contacted the web host, a notable one this end and asked about them, what they are, what could be generating them, as in my many years of Drupal & Wordpress use, have never been aware of them, .. whether they are safe and whether one could safely delete them.

The response suggests the web host support personnel were not aware of what they are. They assured me they are not from "them", that I should scan them with an antivirus and if I wanted to delete them, probably first make a back-up.

I then turned to Cpanel.net Forum, where they implied they are normal back-up files, etc and referred me to some documentation, including https://forums.cpanel.net/threads/big-phpxxxxxx-files-in-home-user-cagefs-tmp.609659/. Since I was worried about the sudden appearance of these files and the way they were using up the limited disk space, I asked them to clarify their importance more and they referred me to CloudLinux.


My question is how come these files are just becoming conspicuous now and not at earlier web hosts I run sites like Justhost.com, Hostmonster and a number of other smaller hosts in Germany who whoever do not use Cpanel?
[/list]


  • Could .cagef be connected to PHP 7.0? Although one or so of the 3 sites at current host had been upgraded from PHP 5.6, I recently upgraded all to v7.0.
  • Has this .cagef got anything to do with PHP 7.0? The folks at Cpanel.net did not think so.
    The caching plugins I use for Wordpress include WP Super Cache, I know save their files within the CMS files http://site.com/wp-content/cache and not outside, unless I am mistaken.



  • What is stored in these giant files and is it normal for Wordpress or Drupal to generate such files?
  • With respect to the unusual gobbling up of disk space, can they be set to be deleted sooner than the 1 month I read somewhere via cron?
    If they are for back-up site data, is this a new method in addition to what has always been available via Cpanel or manually backing up the site files and database, which have always worked?


As said, I'm on shared hosting, with s limitations. The web host hardly agrees to change their server settings, even when it involves a request to allow elsewhere commonly php functions, that some Wordpress plugins use or for some functions in Drupal 8.

I would very much appreciate your clarification of the raised points about these giant files.

Thank you in advance
Attachments (1)
Rate this post:
  1. 14.12.2018 11:12:37
  2. # 1
Aleksei Faians Accepted Answer
Posts: 21
Joined: 02.04.2018
0
Votes
Undo
Hello,

We had customers facing similar issues with huge tmp files. In every cases this was related to some malicious requests to vulnerable php scripts, usually part of WordPress. What happens is that someone starts sending a huge amount of data to the script, the script then killed because of running more than allowed by max_execution_time parameter, and tmp file is never cleaned up. To work around this issue you can configure tmpwatch to clean up tmp files faster. Please check this documentation article: https://docs.cloudlinux.com/tmp_directories.html

Please note that this issue is not related to CageFS directly, it is a problem with native PHP and we cannot do anything about that. Without CageFS it would still leave huge files in system-wide /tmp folder.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
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)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.