Dealing with disk_full mode in a Database Instance
Whenever your Database Instance volume is close to reaching full capacity, your Database Instance switches to disk_full
mode.
The Database Instance switches to disk_full
mode when the amount of free space in the volume falls under 2% of the total volume size.
For Database Instances where 2% of the volume size is more than 2 GB, this threshold is 2 GB.
This state allows you to increase your volume, if you use Block Storage, or upgrade your node type. You are also able to clear some space in your volume to increase your capacity.
When the Database Instance switches to disk_full
state, the default transaction mode automatically switches to read only
. This allows your applications to still access its data, while preventing new data from being added.
If you wish to clear out space in your Database Instance volume, you can carry out the following actions:
-
Run the following commands to shift to a
read write
transaction:-- On PostgreSQLBEGIN;SET TRANSACTION READ WRITE;-- On MySQLSET transaction_read_only=0;BEGIN; -
Clear out data from your database.
-
Commit your changes.
COMMIT;
When there is once again enough space available in the Database Instance, the default transaction mode changes back to read write
, allowing operations to return to normal.
Failing to clear out some of your data, or forcing insertions while the database is in disk_full
mode leads to downtime