Common SQL Errors

MySQL Error 20: EE_DISK_FULL - How to Fix Disk Full Write Failures

Galaxy Team
August 5, 2025

MySQL cannot write data because the host file system has run out of free disk space.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 20 EE_DISK_FULL?

MySQL Error 20: EE_DISK_FULL signals that the operating system reported no free disk space, so MySQL stopped writing to tables, temp files, or logs. Free space on the affected partition, move the tmpdir, or expand storage to clear the error and resume queries.

Error Highlights

Typical Error Message

Disk is full writing '%s' (OS errno %d - %s). Waiting for someone to free space...

Error Type

Storage Error

Language

MySQL

Symbol

EE_DISK_FULL

Error Code

20

SQL State

Explanation

Table of Contents

What does MySQL Error 20: EE_DISK_FULL mean?

The message "Disk is full writing '%s'" tells MySQL that the underlying file system has no free blocks, causing writes to abort. The server returns global error code 20 (condition EE_DISK_FULL) and pauses affected sessions until space is released or the timeout is reached.

The error can trigger while inserting rows, creating indexes, running ALTER TABLE, writing binary logs, or materializing temporary result sets.

It is critical to act fast because further writes from other sessions will also block or fail, risking data loss and service outages.

When does this error surface?

MySQL checks free space each time it allocates disk blocks for data files, redo logs, binlogs, tmpdir files, or sort buffers that spill to disk.

If the operating system returns errno 28 (or a vendor specific equivalent), the server raises EE_DISK_FULL immediately.

The error repeats until at least one contiguous free block becomes available. On busy systems with long-running queries, even a few kilobytes of space can save a session, so proactive monitoring is crucial.

What Causes This Error?

Rapid data growth, oversized binary logs, or forgotten tmpdir files are the leading causes.

Mis-configured partitions with separate data and tmp locations can silently fill up temp space first, surprising administrators.

Low inode counts on ext4 or XFS can also trigger EE_DISK_FULL even when byte capacity remains. Containerized deployments sometimes inherit small overlay volumes that fill with redo logs or double-buffered writes.

How to Fix MySQL Error 20: EE_DISK_FULL

Free immediate space by archiving or deleting binary logs, rotating general and slow logs, or truncating large temporary files.

If ibtmp1 has ballooned, restart MySQL with innodb_temp_data_file_path set to a lower cap.

Move the tmpdir to a larger partition with symbolic links or by editing my.cnf and restarting MySQL. For permanent relief, extend the underlying volume or migrate data to a bigger disk.

Common Scenarios and Solutions

Large ALTER TABLE operations create massive temporary files. Use ALGORITHM=INPLACE or gh-ost to avoid full copies.

Huge SELECT … ORDER BY statements spill to tmpdir; raise sort_buffer_size cautiously or add RAM.

Binary log spikes after bulk inserts can eat disk. Enable automatic PURGE BINARY LOGS or set binlog_expire_logs_seconds to prune old logs.

Best Practices to Avoid This Error

Implement filesystem alerts at 80 percent capacity and monitor inode usage.

Rotate logs automatically and cap temp tables with innodb_temp_data_file_path.

Galaxy's modern SQL editor surfaces long-running queries and integrates with monitoring hooks, letting teams detect abnormal disk growth early and refactor queries before they spill to disk.

Related Errors and Solutions

Error 1021 (ER_DISK_FULL) appears at the session level when a single DML fails for lack of space. Both map to errno 28 but differ in scope. Error 1030 (ER_GET_ERRNO) may wrap EE_DISK_FULL for InnoDB operations.

Address them with identical free-space strategies.

.

Common Causes

Rapid data growth

Large INSERT, ALTER TABLE, or bulk load operations can outpace monitoring, filling data or log partitions in minutes.

Unpruned binary logs

High-traffic replication setups accumulate binlogs quickly if automatic purging is not configured.

Runaway temporary files

Complex queries that sort or use derived tables write massive files to tmpdir, especially when RAM is limited.

Low inode availability

File systems can run out of inodes before bytes, producing EE_DISK_FULL even with visible free space.

Container volume limits

Docker or Kubernetes volumes often default to small overlay sizes that fill with redo or log files.

.

Related Errors

FAQs

Does EE_DISK_FULL always point to the data directory?

No. The error fires for any partition MySQL writes to, including tmpdir, log_error directory, or separate binlog disks.

Can I ignore the error if queries still run?

Temporary space may free up briefly, but MySQL will raise the error again. Resolve it immediately to avoid crashes.

How do I prevent ibtmp1 from filling disk?

Upgrade to MySQL 8.0.16+, cap innodb_temp_data_file_path, and tune queries to reduce temp table usage.

How does Galaxy help catch disk issues?

Galaxy highlights slow or disk-heavy queries, offers AI optimization suggestions, and surfaces real-time database alerts within the editor.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo