Disk full

Updated 11 October 2026

Short answer

When a server's disk fills up, things fail in confusing ways: the database stops or won't start, uploads fail, sessions break, and the site may show database or 500 errors. Run df -h to confirm a disk is at 100%, then find what filled it. It's usually log files that were never rotated, old backups, cache folders, or uploaded files.

What's the problem

The site shows database errors or 500s, uploads fail, or you see "No space left on device" in logs or when running commands.

Why it happens

  • Log files growing forever because log rotation isn't set up, or an error is being logged thousands of times a minute.
  • Backups kept on the same server and never deleted.
  • Cache or temporary files piling up.
  • Uploads growing past the plan's storage.
  • Old releases or container images from deployments left on disk.
  • The database itself growing.

How to fix it

  1. Confirm it: df -h shows each disk and how full it is.
  2. Find the biggest folders: du -h --max-depth=1 / | sort -h (then drill down into the largest).
  3. Clear safely: compress or delete old logs, move backups off the server, empty cache folders. Don't delete database files by hand.
  4. Restart services that stopped, such as the database, once there's space.
  5. Stop it happening again: set up log rotation, store backups elsewhere, and set an alert at 80% full.
  6. If it's genuine growth, add storage.

What Preventionlabs checks

One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go; uptime checked every 5 minutes, with an email when the site goes down and when it is back. With Cloudflare connected, it also shows which pages returned server errors (5xx) to visitors, and when; recent deploys and account changes, with their times. It can't log in to your server, so memory, disk and process problems show up in your host's dashboard and logs.

Run your free report

Your first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.

Sources

  1. GNU Coreutils: df invocationmanualdf reports the amount of space used and available on file systems.
  2. MySQL: Can't connect to [local] MySQL serverofficial docsThe error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server.
← All of Server