Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Our Server Keeps Running Out of Disk Space and the Site Stops Working. Why Does It Keep Filling Up?
Problems We Solve

Our Server Keeps Running Out of Disk Space and the Site Stops Working. Why Does It Keep Filling Up?

Server disk full again and the site or database stops working? Why logs and files fill disks, and how SpiderHunts adds rotation, limits and early alerts.

Updated 3 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

A server disk that keeps filling up is nearly always logs, uploads, temporary files, old backups or database growth that nothing ever cleans up. SpiderHunts finds what is using the space, sets rotation and retention rules for each source, moves growing data to storage built for it, and adds alerts well before the disk is full, so the site does not stop the next time it happens.

No space left on device

The site goes down without warning. Pages return errors, or the database refuses to accept new orders, or uploads fail with a message nobody on the office side understands. A developer logs in, finds the disk at full capacity, deletes a pile of old files to make some room and restarts things. Everything works again.

A few months later it happens again, and the same developer does the same clean-up. Nobody has worked out why the disk fills up in the first place, so each time it is treated as bad luck.

What quietly eats the space

Disks rarely fill because of one big file. They fill because several things grow a little every day and nothing ever removes the old parts.

SourceWhy it grows
Application and web server logsWritten every request, never rotated or deleted
Debug logging left onA setting used while fixing something once, still writing detail on every call
Uploads and generated filesInvoices, exports, images and reports saved to the server and never archived
Local backupsNightly database dumps stored on the same disk, kept forever
Database growthSession, audit and log tables that nobody trims
Temporary and cache filesLeft behind by failed jobs or old software versions
Container imagesOld Docker images and volumes piling up after each deployment

The local backups row causes double trouble. It fills the disk, and a backup on the same disk as the data does not protect you if that disk fails.

What a full disk costs

When a disk fills, it rarely fails politely. Databases can stop accepting writes or, worse, corrupt a table partway through. Queues stop. Emails that should have gone out do not. Logs stop being written at the exact moment you need them to understand what went wrong.

There is also the cost of the clean-up itself. Deleting files in a hurry on a production server is risky. It is easy to remove something that mattered, like the only copy of an export a customer needs or a file the application still expects to find.

And because it recurs, it costs the same person the same evening every few months, which is time that could be spent fixing the cause.

How we stop the disk filling up

  1. Find what is using the space. We measure disk usage by directory, by log file, by database table and by container, and track how quickly each one grows.
  2. Set log rotation and retention for every log source, using the operating system's tools (logrotate on Linux, or the equivalent on Windows) and the application's own settings, with debug logging turned off in production.
  3. Send logs somewhere built for them. Where logs need to be kept and searched, we ship them to a central service such as AWS CloudWatch, Azure Monitor or a log platform, with a retention period you agree, instead of keeping them on the web server.
  4. Move growing files to object storage. Uploads, exports and generated documents go to Amazon S3, Azure Blob Storage or similar, with lifecycle rules that archive or delete old items.
  5. Move backups off the server to separate storage, with their own retention rules, so they neither fill the disk nor share its fate.
  6. Trim database tables that only grow, such as sessions and old audit entries, on a schedule, archiving anything that must be kept.
  7. Clean up after deployments, removing old releases, container images and temporary files automatically.
  8. Alert early. Disk usage and growth rate are monitored, and a named person gets an alert well before the disk is full, not when it already is.

Where the server simply needs more space for good reasons, we say so and resize it, but only after the waste is gone, so the extra space is not just filled by the same logs.

What changes afterwards

Disk usage stays level instead of climbing. Logs are kept for as long as they are useful, in a place where they can be searched. Files and backups live in storage designed for them. And if something does start growing unexpectedly, someone hears about it while there is still plenty of room to deal with it calmly.

Is your server doing this?

  • Your site or database has stopped because the disk was full.
  • Someone periodically logs in and deletes old files to free space.
  • Log files on the server are very large or date back years.
  • Backups are stored on the same server as the live data.
  • Nobody gets an alert when disk space runs low.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Can we not just add a bigger disk?

You can, and sometimes it is the right call. If the cause is unrotated logs or files nobody cleans up, a bigger disk only delays the next outage.

Will we lose logs we might need?

Not if retention is agreed up front. Logs you need to keep are moved to central storage, which is easier to search than files on a server.

Is it safe to delete old files on a live server?

Only once you know what they are and whether anything still uses them. We identify each source before removing anything, and back up anything uncertain first.

Does this apply to cloud servers too?

Yes. Cloud virtual machines fill up in exactly the same way, and managed databases can hit their storage limits. The same approach applies.

Keep reading

More on Problems We Solve

Start here

Disk filling up and taking things down?

Tell us what runs on the server, where it is hosted and what happened the last time it filled up. We will find what is eating the space and suggest the fix, and if one missing log setting is the cause, we will say so.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →