Aria2 Disk Full Error: What Happens & How Is It Logged?
When the lightweight download utility aria2 encounters a disk full error, it immediately halts the affected download, updates its internal status to indicate a failure, and outputs a specific error message to both the console and its log files. This article explains how aria2 handles insufficient disk space, the exact error codes and log formats you can expect to see, and practical configurations to prevent these failures before they happen.
What Happens During a Disk Full Error
When aria2 is actively downloading a file and the underlying storage device runs out of space, the application cannot write incoming data blocks from the network to the disk. To prevent data corruption and unnecessary resource consumption, aria2 executes a specific sequence of actions:
- Halts the Download: The specific download task that triggered the error is paused or marked as failed. Other independent downloads in the queue may continue until they also encounter the storage limit.
- Releases Network Resources: Connections to peers (in BitTorrent) or servers (in HTTP/FTP) for that specific task are closed to avoid wasting bandwidth.
- Saves Progress: aria2 attempts to save the
.aria2control file, which keeps track of the downloaded pieces, allowing you to resume the download later once space has been cleared.
How the Error is Logged
Aria2 communicates a disk full error through standard error outputs
(stderr), console notifications, and dedicated log files if
logging is enabled.
The Console and Log Output
When the disk fills up, aria2 typically throws a “Exception: [FtpRepo.cc:234] errorCode=14 Failed to write to file” or a similar system-level I/O error. The log entry will explicitly state the cause, usually looking like this:
2026-06-12 17:06:43.123456 [ERROR] [download_helper.cc:142] CUID#7 - Download aborted. Reason: Check sum or disk full error.
If you have enabled detailed logging using the
--log=logfile.txt option, the system error code provided by
the operating system (such as ENOSPC on Linux/Unix systems,
meaning “No space left on device”) will be captured in the stack
trace.
Error Codes
When aria2 exits due to a critical error, or when you query the status via RPC (Remote Procedure Call), it returns a specific error code. For disk-related space issues, it generally surfaces:
- Exit Status / Error Code 14: This indicates a generic I/O error or a failure to write data to the disk, which is the standard response to a full storage drive.
How to Prevent Disk Full Errors in Aria2
Instead of waiting for a download to fail mid-way, you can configure aria2 to allocate the required file space before the download even begins. This ensures that if you do not have enough disk space, the download will fail immediately at the start rather than hours into the process.
You can achieve this by using the file allocation feature in your configuration file or command line:
--file-allocation=falloc
Allocation Options Comparison
| Option | Method | Behavior on Full Disk |
|---|---|---|
none |
No pre-allocation | Fails mid-download when disk fills up. |
prealloc |
Pre-allocates space | Fails instantly at the start if space is insufficient. Takes time to write zeroes. |
falloc |
Fast allocation (Recommended for Linux/ext4) | Fails instantly at the start if space is insufficient. Allocates space almost instantly without writing zeroes. |