What are inodes?
Inodes are the number of files that are stored on your hosting service, and on a shared web hosting service, this is figure is limited depending on the plan you’re on.
Exceeding this limitation can cause your website to display a 503 error.
How to check your inode count
Next, after you’ve connected via SSH, you should navigate enter the following command:
find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn
This will show a breakdown of how many files are in each folder (of the current directory) and a total at the bottom. This is where you can begin your investigation, and running the command in different directories.
You can change directories on our servers using the following command:
To go back (up) a directory, use this command:
Reducing the number of files on your hosting service
Some of the common reasons your inode count can near its limits include:
- You are on a plan too small for your website
- The Content Management System you’re using requires a lot of files
- You have duplicate uploads
- Your website is creating an excess of error logs
Once you’ve identified the source of your high file usage it is up to you to consider whether a bigger plan is best for you, or if you could safely delete some of these files if unnecessary.