How to fix Disk Quota Exceeded error in Linux servers

How to fix Disk Quota Exceeded error in Linux servers

Disk Quota Exceeded is a common error in Linux web hosting servers. Website owners see this error when they try to upload a file, send a mail or update a database.

Every month, our engineers resolve hundreds of “Disk Quota Exceeded” errors in our role as website support for web hosting companies. We’ve seen these 2 causes for the error:

  1. Users exceeding their mail or web space quota
  2. Corrupted disk quota table
  3. File limit (inode) exhaustion

Today, we’ll take a look at how to troubleshoot, fix and prevent quota exceeded errors.

Website not functioning right?


Fixing mail/web space overage

About 80% of disk quota exceeded errors occur due to users uploading files beyond their subscription limit.

In many cases, we’ve found large files (such as backup, videos, DB dumps, etc.) in the user’s home directory itself. But there are other locations that are not so obvious:

  1. Trash or Spam mail folders
  2. Catch-all mail accounts
  3. Web app log files (eg. WordPress error log)
  4. Old log files (eg. access_log.bak)
  5. Old uncompressed backups (from a previous site restore for eg.)
  6. Un-used web applications

It’s not easy to find these space files if you look at a web panel report. That is why we use Linux command line tools (such as du) to list all directories in a user’s account, and sort them as per size.

Once we’ve found the top directories, we drill down until we locate all non-essential files.

disk space listing - disk quota exceeded


[ Never let disk quota errors affect your website functioning. Get our professional help to fix your website errors at affordable pricing. ]

Special case – User’s files located outside home directory

In self-managed VPS servers, we’ve found user files stored outside the user’s home directory. This could be from past troubleshooting steps, incomplete site restore, etc.

We’ve found such files in /usr, /var, / or in some cases even in /root directory.

We resolve this issue by searching the whole file system with the username, deleting them, and then updating the quota table.

Pro Tip : All this detective work takes time. Business mails coming in during this period will bounce. So, if you’re a shared web host, increase the quota by 100 MB temporarily so that services to the user is immediately restored.

Fixing cPanel disk quota cache error

In cPanel servers, even after a disk quota exceeded error is resolved, the web panel shows the old disk space info. That is, even if a 1 GB file is deleted, the space usage doesn’t show any difference.

It is caused by a cPanel feature called “disk quota cache”. cPanel stores disk usage info for 15-30 mins, to reduce disk access, and thereby keep down server load.

To fix this, our tech support team uses two approaches:

  1. In powerful servers, we disable this cache (choose off), as server load isn’t affected.
  2. In heavily loaded or less powerful servers, we educate the users via custom tool tips in the panel that the correct value will be reflected in 15 mins.

Disable disk cache in cPanel - disk quota exceeded


Don't let disk quota issues affect your business. Let us help you.


Submit a Comment

Your email address will not be published. Required fields are marked *



Security specialists will audit, update, patch, harden and monitor your server 24/7.

Starting at $69.99/month