Issues
- open(/var/lib/php/sessions/sess_, O_RDWR) failed: No space left on device (28)
- PHPMysql not connect
- Database not connect
Solusions
Check CPU and MEMORY usage of server from terminal
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head
df -hCheck file size
find /home/ -size +100M
Check INODES in server (Inode mean total files into server)
df -i
Search INODES from system and perticular folder (Get number of file in perticular directory)
for i in /var/www/html/*; do echo $i; find $i |wc -l; doneCheck INODES into specific directory
ls -l /var/lib/php/sessions | wc -lRemove all files from specific directory
rm -r /var/lib/php/sessions/If you are using PHP so you can create code in any existing file
$path = '/var/lib/php/sessions/';
$dir = opendir($path);
$i = 0;
while ($dir && ($file = readdir($dir)) !== false) {
unlink($path.$file);
echo $i.' - '.$path.$file.'<br>';
if($i == 50000){
exit;
}
$i++;
}