When the disk space is full, MySQL what happens? How they should respond?
When the disk space is filled, MySQL is unable to write any data, including data written to the table, and binlog, binlog-index and other documents.
Of course, because InnoDB is dirty data can be placed in memory, so it will not show up immediately can not be written unless opened binlog, write request will be blocked.
When MySQL detects the disk space is full, it will:
Per minute: check whether the space is released, in order to write new data. When there is free space, it will continue to write data, as usual.
Every ten minutes: If you still have not found the remaining space, it writes a record in the log reports of disk space is full (this time only a few bytes written or enough).
How should I do
So, when you notice the disk space is full, how should we deal with it, we recommend:
Improve the monitoring system detecting a frequency to prevent recurrence;
Promptly remove unused files to free up space;
If the thread is full of problems because disk is blocked, it can kill the first, until the next minute it may be re-tested and can work properly;
May lead to some due to disk full thread is blocked, causing other threads are blocked, can kill the lead to blocked thread, other threads are blocked also be able to continue working.
There are exceptions:
When performing REPAIR TABLE or OPTIMIZE TABLE operation, or after executing the ALTER TABLE or LOAD DATA INFILE batch update the index, these operations will create temporary files when the execution of these operations mysqld find disk space is full, this will involve to the table is marked as crashed, delete temporary files (except ALTER tABLE operation, MySQL will abort the operation being performed, remove temporary files, free up disk space).
NOTE: When the execution of these commands mysqld process is killed accidentally, then it generates temporary files are not deleted automatically, you need to manually delete to free up disk space.