How MySQL processes Disk Full

Source: Internet
Author: User

This article describes how MySQL responds to Disk Full errors (for example, "No space available on the device "), and the method to respond to the out-of-box quota error (for example, "Write failure" or "User blocking limit reached ").

This article describes how to write data to the MyISAM table. It is also suitable for writing binary log files and binary index files, but applications of "row" and "record" should be considered as "event ".

When the disk is full, MySQL will:

Check every minute to check whether there is sufficient space to write data to the current row. If there is enough space, it will continue, just as nothing happens.

Write one entry to the log file every 10 minutes to remind you that the disk is full.

To mitigate the problem, the following measures can be taken:

To continue, you only need enough disk space to insert all records.

To discard a thread, you must use mysqladmin kill. The thread will be dropped (1 minute) next time you check the disk ).

Other threads may be waiting for the table that causes the disk to be full. If there are several "locked" threads, kill a thread waiting when the disk is full to allow other threads to continue.

The exception to the above behavior is that when you use repair table or optimize table, or when the index is created in a batch after the load data infile or alter table statement. All these statements can create large temporary files. If these files are retained, other parts of the system may encounter major problems. If the disk is full when MySQL executes such operations, it will delete large temporary files and mark the table as crashed. Except for alter table, the old TABLE remains unchanged.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.