Importance of Maintaining Free Disk Space on Servers

After doing my daily check up on my Webserver hosting a few websites (including this one) and multiple mySQL database, I found something was not right as all of the websites I host that used a database were seeing “Could Not Establish Connection To Database.”  I Looked at the  error logs and saw nothing, the file was clean, you would think having nothing in your error log is a good thing right? Well not in this case…

The message “Could Not Establish Connection To Database” is telling you that, well it can’t connect to the mySQL server, so make sure that it is running. After logging into the server I noticed that the mySQL server has stopped running, but why? Ok simple fix, I’ll just restart the mySQL server by issuing the command “start mysql.” No luck I was getting another error message “start: Job failed to start mysql,” ok but why? Ok I’ll check the error log again, maybe there is something in there now! Nope, error log is still blank.

After realizing how long the issue has been occurring (1 1/2 hours after 5 PM) I realize that 5PM is when the server does a complete database backup of everything, 5PM everyday. I go and check the folder of backups and see there is over 1 months worth of backups, all 190MBs or more. Although the server is backing up the databases as planned it’s also not deleting old database backups as it should be, because having a server backup everyday can eat your disk space quickly.

After deleting most of the backups I immediately reissued the “start mysql” command and finally everything started to work again.

TLDR: Make sure your servers have a lot of free disk space.

  • Cameron Munroe

    =)

    • http://www.facebook.com/profile.php?id=100003405560198 Kong

      first of all, never EVER sign up for a web host that limits deasbtaas, emails, subdomains or about anything. Over a year ago I switched totally everything on my shared accounts from goDaddy to and I couldn’t be happier! I can have unlimited web sites, deasbtaas, or whatever I want for a very reasonable price.Secondly though, no plugins don’t require additional deasbtaas they just create new tables in your existing WordPress database. The problem installing (and removing) dozens of tables into a WordPress database poses is that usually when a plugin is deleted, the tables and data it created are left behind leaving your to manually remove them and clean it up. Some of the better plugins do clean up after themselves or have a completely uninstall option.

  • http://www.facebook.com/profile.php?id=100003405573707 Kevin

    Some good tips here, but when you mention to watch your rbowser to see about external calls, you really need to be using Firefox with the add-on Firebug. This will give you a wealth of info on your site, and what’s taking time to load. Your point about optimizing images is key, there are plenty of online sites that will do it for you for free (something nice if you’re at work and don’t have access to PS or The Gimp). You mention tuning your DB, but how about ensuring that the new database is created as InnDB? That’ll help, and I think is default for anything +5.2.x. Also, while most won’t have access, you can really improve things in MySQL by modifying the my.cnf conf file on your server. Upping memory usage and enabling caching are key here.Other ideas that I use, but are only applicable if you have your own server or access:webserver instead of Apache, use Lighttpd, it’s faster and lighter’. if you’re extra l33t, try out nginx!php ensure you have some kind of php accelerator I’ve used eAccelerator (a fork of the old MMTurke Cache) for years, but I’ve recently been using Xcache (created by a developer of Lighttpd) and have been happy with it so far.reverse-proxy a big one if you get a lot of traffic, but still helpful if you don’t. Squid has always been the choice, but again, I’ve gone with a newer app, Varnish. I’ve done tests in production areas at my work, and believe the hype, Varnish will stand up and really help, esp if you ever get a Digg’ing. It is fast, and old Squid just dosen’t compare.Lastly, within WordPress add WP Cache, or the newer/updated fork, WP Super Cache it speeds things up nicely. Yes, you can have all of these layers of caching (reverse proxy, php opticode, wp-cache) working together.So these are just some of my geekier suggestions, it’s funny, I’ve run my server online from home since 2001, but it’s only been the last 3 months I’ve looked at monetizing sites; it’s good fun, and sites like yours give a good start to a n00b’ like me!Hope my tips help, gimme a shout if you have any questions. I’m hoping to be able to contribute to the whole online marketing world soon much as you are now.Thanks.fak3r’s last blog post..

My GitHub Repos

ServerStatus

Server Status website script, displays uptime (days), free RAM, free HDD.

Quick Gallery

Instantly make your web folder of images an online gallery.

Twitter Feed