The filesystem “/var/tmp” mounted at “/var/tmp” reached “warn” status because you currently use 82.88% of its available inodes.

monkey64

Well-Known Member
Nov 6, 2011
124
5
68
cPanel Access Level
Root Administrator
I received 2 emails from cPanel Monitoring:


The filesystem “/tmp” mounted at “/tmp” reached “warn” status because you currently use 82.88% of its available inodes.
Notification Type:​
warn ⚠
Server:​
server.com​
Primary IP Address:​
12.34.56.78​
Filesystem:​
/tmp​
Mount Point:​
/tmp
Percent Used:​
82.88%​
Inode Usage:​
Used:​
217,266​
Available:​
44,878​
Total:​
262,144​
ChkServd Version:​
17.0

AND this one sent at the same time:

The filesystem “/var/tmp” mounted at “/var/tmp” reached “warn” status because you currently use 82.88% of its available inodes.
Notification Type:​
warn ⚠
Server:​
server.com​
Primary IP Address:​
12.34.56.78​
Filesystem:​
/var/tmp​
Mount Point:​
/var/tmp
Percent Used:​
82.88%​
Inode Usage:​
Used:​
217,266​
Available:​
44,878​
Total:​
262,144​
ChkServd Version:​
17.0

Here is the output of du -h

devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs 3.8G 385M 3.5G 10% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sda 156G 43G 113G 28% /
/dev/sdd 148G 80G 60G 58% /home2
/dev/loop0 3.9G 24M 3.7G 1% /tmp
tmpfs 777M 0 777M 0% /run/user/0

Here is the output of du -ih

Filesystem Inodes IUsed IFree IUse% Mounted on
devtmpfs 967K 341 967K 1% /dev
tmpfs 972K 1 972K 1% /dev/shm
tmpfs 972K 665 971K 1% /run
tmpfs 972K 17 972K 1% /sys/fs/cgroup
/dev/sda 10M 340K 9.7M 4% /
/dev/sdd 9.4M 680K 8.8M 8% /home2
/dev/loop0 256K 216K 41K 85% /tmp
tmpfs 972K 232 971K 1% /run/user/0


Now I have just noticed that php uses /tmp as its session.save_path. I think the default was meant to be "/var/cpanel/php/sessions/ea-php74". Could this be causing the problem?

I have attached a screen-shot of the contents of my /tmp directory.

I'm not sure what action I need to take. Can anyone help?

Any ideas?
 

Attachments

Last edited:

monkey64

Well-Known Member
Nov 6, 2011
124
5
68
cPanel Access Level
Root Administrator
Just to update...

It was PHP writing session files to /tmp which caused the issue.
As a workaround, I ran the following to remove sess_* files older than 1 day:

Code:
find /tmp/systemd-private*php-fpm.service* -name sess_* ! -mtime -1 -exec rm -f '{}' \;
After that, I changed the session.save_path to the default (/var/cpanel/php/sessions/ea-php74). CPanel have a script to clean user php session (/usr/local/cpanel/scripts/clean_user_php_sessions) which runs periodically via CRON. Now the sessions are stored in the right place, I'm hoping that they should get removed by the script.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,539
2,608
363
cPanel Access Level
Root Administrator
Hey there! On my personal system I see that PHP 7.4 has this configured as the default:

session.save_path = "/var/cpanel/php/sessions/ea-php74"

so if that as set to something else, that change was likely made to the server at some point. With the changes you've implemented I would expect the server to work well.