disk-full
The disk is almost full, so the database refuses writes until there is room again.
- Routes:
write-events,register-event-schema,restore-backup, andimport-events - Description:
disk is full: less than the reserve of 1 GiB is free, so the store refuses writes until at least 1 GiB has been free for 10 seconds - Details:
operation, which is alwayswrite.
Why It Happens#
EventSourcingDB keeps a reserve of 1 GiB free on the file system that holds its data directory. It checks the free space when it starts and every second after that, and once less than 1 GiB is free, it refuses writes. Once at least 1 GiB has been free again for 10 seconds, it accepts writes again by itself, without a restart. Reading, observing, and every other route that does not write go on as usual, see Read-Only Mode While the Disk Is Almost Full.
If writes are refused for another reason as well, the error names the one that takes the most to lift: server-shutting-down, store-failed, and store-read-only are reported instead of disk-full, and disk-full instead of restore-in-progress.
How to Fix It#
Free space on the file system of the data directory, or enlarge it, until at least 1 GiB is free, and more where you can, since the writes that follow fill whatever is free above the reserve. About 10 seconds later, the database accepts writes again, and sending the same request again can succeed; the refused request has changed nothing.
Example#
For a write while the disk of the data directory is almost full, EventSourcingDB answers with this error, as a line of the stream, and then ends the stream with its end item:
{
"type": "error",
"data": {
"code": "https://docs.eventsourcingdb.io/errors/disk-full",
"description": "disk is full: less than the reserve of 1 GiB is free, so the store refuses writes until at least 1 GiB has been free for 10 seconds",
"details": {
"operation": "write"
}
}
}