A Magento site went down with a bunch of error messages saying that:
Warning: SessionHandler::Read() No space left on device
First thought, ok, that’s easy. I can just log in and clean up some cache data or log files and everything will just be fine after that.
Turns out, after running df -h, there are still tons of spaces left on the server.
So, what’s the deal?
Here come the inodes.
The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object’s data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.
Basically, if you have a lot of big files, you will most likely run out of space, the physical real space. But if you have a lot of tiny small files, you will likely run out of inodes. When that happens, you will get the out-of-space message even though there is still a lot of free space left on your drive.
To find out the number of inodes,
df --inodes or df -i
Next step, let’s identify which file or folder consumes the inodes.
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
Once find out, dive into that folder and clean things up. In my case, it’s the folder /var/lib/php/sessions that consumed all the inodes.
sudo rm -rf /var/lib/php/sessions/ sudo mkdir /var/lib/php/sessions/ && sudo chmod 1733 /var/lib/php/sessions/
If using Copilot right from the Taskbar isn't your thing, you should disable it. Even…
In an environment where standardizing things does matter, setting default fonts in Microsoft Office apps…
Wake-On-LAN is a networking standard that lets you wake up a computer from either a…
First of all, this is not to bypass a PDF file that requires a password…
Microsoft has been lurking about the idea of placing the Outlook navigation bar to the…
One colleague came up to me the other day asking me to take look at…