How To Decrease File Usage (INODE) Limits In cPANEL2016-11-23|Views:12464
What is Inode?
Inodes are data structures used to store the meta data of files. Inode number refers to the collective number of files and folders existing in your web hosting account.
What is Inode Limit ?
UltraHostGhana has limits for Soft and Hard limits on all Shared/Reseller, and vps hosting accounts. The soft limit is displayed in cpanel stats panel under 'File Usage'.
You will still be able to upload files even if you reach soft-limit, but once hard limit threshold is reached file creation/upload will stop working. You cannot receive new emails or create files on the server.
You may also see 500 internal error messages on your website if the soft limit is exceeded.
View Inode usage in cPanel
First, login to your cPanel home page. In sidebar, you can see the ‘File Usage’ statistic which is the Inode usage of your account.
You can also view the number of files in directories on your account via SSH or Terminal by running the command below. You can use Terminal in your cPanel or request for SSH access by opening a ticket from your client dashboard. Running the command will display the number of files in each directory at the root level or the current directory you are in.
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
You can change directory using the cd command. eg:
After running the command, it will output something like below. The output has two columns. The first column is the number of files and the second column is the name of the folder or directory.
So in the example, the directory called www has the highest number of 34875 files.
bash-4.2$ du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
Backups and Inodes (File Usage)
Important! All accounts with file usage that exceed 100,000 inodes or 10GB are automatically excluded from our complimentary backups.
Decreasing Inode usage Inside cPanel hosting
Most often people will not need to be familiar with Inodes if they are using their hosting in normal circumstances such as for a basic or intermediate website and normal email use. However, to ensure that all our customers get a consistently high level of service we have deployed inode limits per account to check resource abusers within our Shared and Reseller hosting packages.
It is worthy to note that, not all inode excesses are caused by abuse. It could only be that you need to do a bit of a clean up of your files. If you experience issues caused by high Inode usage then this tutorial is aimed at helping you decrease the number of inodes on your UltraHostGhana hosting account.
Here are some steps to reduce the inode number limit.
1) Delete unnecessary files and folders
Carefully examine your files and folders manually to decide on if the file/folder is necessary or not. In case, the file is an old backup archive or the folder is created for testing or staging purpose, you may remove it or download it locally via FTP or cPanel >> FileManager and delete it from the server.
2) Clear the cache files
Most of the CMSs use cache to reduce the response time for functions. Applications like WordPress and Joomla, etc. can create a lot of cache files which can increase the inode usage greatly. It is therefore recommended that you keep an eye on the cache files and folders to ensure the number of cache files is the least.
Most of the CMSs now provide a means to clean the cache and you can make use of it to control the number of cache files. In a more advanced step, you can setup a cronjob to automatically clear the cache files at intervals of time.
If you have the inode limit getting hit regularly or you still have issues after you have cleared up your files, we suggest you to upgrade the package to a higher one with higher inode limit or consider a Virtual Private Server. You can contact UltraHostGhana support for this.
3) Clear Old and Spam Emails
Deleting the old emails helps a lot in decreasing the inode usage. There might be spam mails in your mailbox which are of no use and deleting those mails will help you to reduce the inode number. You can remove spam emails from email client or webmail. You can seek help from the UltraHostGhana support team to delete the mails easily via shell.