TL;DR You need to free-up some space on your server (or computer) or get a bigger HDD (or partition).
Today some of the pages on CSSDeck just stopped showing up. All one could see was a blank white page. Pretty scary!
What's the one thing every developer wants? More screens! Enhance your coding experience with an external monitor to increase screen real estate.
I checked the pages across Firefox and Chrome to make sure the issue persisted on both, which was true.
Next, I quickly wget
one of the webpages that wasn’t showing up and noticed something weird. It was giving me a 500 Internal Server Error
. With 500
errors, I would usually suspect something wrong with the Web Server but had no dice with Apache’s /var/log/apache2/access.log
or /var/log/apache2/error.log
.
Checking the development environment locally, no issues were found. So, I almost guessed that something is wrong with MySQL. I quickly picked one of the SELECT
SQL queries from my codebase and executed on the mysql command line on server, and here’s what the output was:
ERROR 1030 (HY000): Got error 28 from storage engine
Wait, what ?! Soon I figured out error code 28 means – “No space left on device”. But why for a SELECT query ? Fetching data should not eat up any extra space, right ? Well, it depends. The data from the query needs to be stored somewhere especially if it has ORDER BY
and GROUP BY
. So mysql creates a temporary file on the disk as far as I know. Plus, there’s even more to be done like opening a file handle, a connection, etc. You get the idea, right ?
You can check your File System’s disk space usage with df -h
. Checking the disk space usage of a file or directory is also simple with du -hs dir/
.
So just fix your drive from being out of space. In my case, I simply purged some big old backup directories.
Iam getting this error : CDbCommand faalde tijdens het uitvoeren van volgend SQL statement: SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine
And this is my df -h output :
Filesystem Size Used Avail Use% Mounted on
/dev/md0 1.4T 16G 1.3T 2% /
udev 7.9G 4.0K 7.9G 1% /dev
tmpfs 1.6G 700K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 144K 7.9G 1% /run/shm
I have 1.3 TB free. i dont think disk space is the problem.