I'm seeing a huge difference of free disk space between
df -h
enter image description here
and du -sxh /
enter image description here

I've understood in my question Resolving unix server disk space not adding up that du -sxh / is a better estimation as to when I will run out of disk space. Having said that, assuming in my case the above sentence will prove to be wrong and I will soon run out of disk space, what will happen? I assume the MySQL will fail INSERT queries, but other than that, will I just need to delete some files or will it be a problematic situation?

  • What happens with any task that requires storage space the operation will fail. The operation will continue to fail until the require storage is available – Ramhound Oct 22 '13 at 11:25

The default storage engine over the years was MyISAM. As of MySQL 5.5, it is now InnoDB.

When it comes to your question, MySQL is a little strange in this aspect because all temporary tables use the MyISAM storage engine.

According to MySQL 5.0 Certification Study Guide,

enter image description here

bulletpoint #11 says the following on Pages 408,409 Section 29.2:

If you run out of disk space while adding rows to a MyISAM table, no error occurs. The server suspends the operation until space becomes available, and then completes the operation.

Given this fact, SQL operations, especially those using temporary tables, do not fail. They simply freeze and wait for disk space to become available. Such operations would fail only if you disconnect the DB Connection.

In that event, the solution would be to free up the diskspace. Then, all moving parts of MySQL that were frozen would thaw out and start moving again.

Perhaps purging old binary logs, dropping old tables, or truncating the error log would help in this aspect.


I have faced such type of problem , It may cause random internal server Error 500 . Then we need to free up some space to keep working swap memories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.