You check df -h and the disk is 50% free. But you can't write to the database or upload files, and the site throws 500 errors. You've hit the inode (file count) limit. Usually caused by thousands of dead PHP session files or unrotated garbage logs.
How to find it? Run df -i to confirm the partition is at 100% capacity. Then run this to find which directory is hoarding a million files:
Bash
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n | tail -n 10
The Fix: Go clean that directory (it's often /var/lib/php/sessions or similar). If you use the classic rm -rf *, you'll get an "Argument list too long" error. It won't work. Use find:
Bash
find /target/directory -type f -delete
🤔
Was this answer helpful?
Görüşünüz bizim için değerli!