sfw/fix
Disk quota exceeded (122) critical

cPanel: Write failed: Disk quota exceeded (122)

The account hit 100% of its disk or inode limit, so nothing can be written — sessions, uploads, and database writes all fail.

What you see

Write failed: Disk quota exceeded
rsync: write failed on "/home/user/...": Disk quota exceeded (122)

What’s actually happening

The site breaks in scattered, confusing ways: logins don't stick (PHP can't write the session file), media uploads fail, the database goes read-only or throws errno 28, and email bounces with "over quota". SSH/SFTP writes return errno 122. The giveaway is that reads still work — the homepage may load while anything that writes silently fails. cPanel's home dashboard shows disk usage pinned at the limit, or inode count maxed even when megabytes look fine.

Common causes

  • The account genuinely filled its disk allocation — large mailboxes, accumulated backups, or a growing uploads/ directory.
  • Inode (file count) limit hit even though disk space remains — millions of tiny files from cache plugins, session files, or mail are the usual offenders.
  • Runaway logs: error_log files in every directory, or a debug log left on, eating gigabytes.
  • Old cPanel/Softaculous backups and .tar.gz archives never cleaned up.
  • A mail account collecting spam in /home/user/mail with no retention, or a full-disk MySQL that can't write its own temp files.

How to fix it

  1. Confirm whether it's space or inodesThey're different walls. Check usage: quota -s and df -h for space, then for inodes count files with for d in ~/*; do echo "$(find "$d" | wc -l) $d"; done | sort -n. cPanel's left sidebar shows both "Disk Usage" and "File Usage (inodes)". A plan can be at 40% disk but 100% inodes — that still throws 122.
  2. Find the biggest consumers fastdu -sh ~/* | sort -h shows where the gigabytes went; usually mail, public_html, or a backups folder. For inodes, the find loop above pinpoints the directory with millions of files — typically wp-content/cache, a sessions dir, or a mailbox with tens of thousands of messages.
  3. Clear the obvious bloatDelete old backups (*.tar.gz in home), truncate runaway logs (: > error_log on the huge ones rather than deleting while a process holds them), empty cache plugin output, and clear spam/Trash mail folders. This buys breathing room so writes work again — do it before anything else fails harder.
  4. Stop it refillingTurn off WP_DEBUG logging, add log rotation, set a retention policy on mailboxes (or move them to IMAP-only with cleanup), and schedule backups to download off-server instead of piling up in /home. Cache plugins that spawn millions of files need a TTL or a different cache backend.
  5. Raise the quota if the account legitimately outgrew itIf you've cleaned up and it's still tight, the plan is undersized. In WHM (reseller/root) bump the account's Disk Quota and Max File Count; on shared hosting open a ticket or upgrade the plan. Don't keep deleting working files to stay under an unrealistic cap.

Stop it recurring

Set a usage alert at 80% in cPanel and rotate logs/backups off-server, so you fix this on a warning instead of after writes start failing.

Related errors