• notice
  • Congratulations on the launch of the Sought Tech site

Mysql handling disk full

This article focuses on how MySQL responds to disk full errors (such as "no space left on device"), and how it responds to over-quota errors (such as "write failed" or "user mask limit reached").

This article covers writing to MyISAM tables.It also applies to writing to binary log files and binary index files, but application of "row" and "record" should be treated as "event".

When a disk full condition occurs, MySQL will:

Check every minute to see if there is enough space to write the current line.If there is enough space, it will continue as if nothing happened.

Write 1 entry to the log file every 10 minutes to alert on disk full conditions.

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

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

To abort the thread, you must use mysqladmin kill.The thread will be abandoned the next time the disk is checked (1 minute).

Other threads may be waiting on the table causing the disk full condition.If there are several "locked" threads, kill a thread that is waiting in a disk full condition to allow other threads to continue.

The exception to the preceding behavior is when you use REPAIR TABLE or OPTIMIZE TABLE, or when the index is created in a batch operation after a LOAD DATA INFILE or ALTER TABLE statement.All of these statements can create large temporary files that, if left, can cause big problems for the rest of the system.If the disk fills up while MySQL is performing such operations, it will delete large temporary files and mark the table as crashed.With the exception of ALTER TABLE, the old table remains unchanged.

Tags

Technical otaku

Sought technology together

Related Topic

1 Comments

author

buy lipitor 40mg online & lt;a href="https://lipiws.top/"& gt;buy lipitor 10mg online cheap& lt;/a& gt; buy atorvastatin generic

Qvgmsh

2024-03-07

Leave a Reply

+