amuck-landowner

Manage VPS /dev/simfs No space left on device

Weoxo

New Member
Hello Friends, I was just checking my VPS and I saw within one day it took more then 1 GB from Disk Space.

I was watching on Different Posts on different websites but i didn't get anything special to solve this problem.

Now my VPS took 1 GB and when it will be full then it will show one message 

No space left on deviceSo i want to solve this problem before i get big problem with this.

Quote said:
root@vps46394:~# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/simfs      11220208 3323144   7372968  32% /
none                   4       0         4   0% /sys/fs/cgroup
none              104860      60    104800   1% /run
none              524288       0    524288   0% /dev/shm
none                5120       0      5120   0% /run/lock
none              524288       0    524288   0% /run/shm
none              102400       0    102400   0% /run/user
Before i got this error but that time it was not in /dev/simfs/ that was something ploop and now it's in /dev/simfs, i solved that ploop error by removing php5/sessions/ss** there was many files like ss*** like more then 10000k files i removed that all and it was solved but this time please help me, how i can manage this problem :). thank You
 

wlanboy

Content Contributer
Sorry for the late reply - the thread did not show up in the latest topics...

1. Find large directories:

du -a /var | sort -n -r | head -n 10Maybe it is not php session related:

2. Set maxlifetime for php sessions: (see http://ar.php.net/manual/en/session.configuration.php)

session.gc_probability
session.gc_divisor
session.gc_maxlifetimeSession garbage collector (GC) will solve that "too many session files"

3. Cron to delete older files

Code:
10,40 * * * *   find /var/lib/php5/ -type f -cmin +$(echo "\`php -i|grep -i session.gc_maxlifetime|cut -d' ' -f3\` / 60" | bc) -exec rm -f {} \\; >/dev/null 2>&1
 
Last edited by a moderator:
Top
amuck-landowner