In the event that your MySQL server runs out of disk space, the service will start malfunctioning, and this will also prevent backups from being properly created.

In order to prevent this from happening, Aiven will automatically detect when your service is running out of free space and prevent further writes to it by setting the MySQL @@GLOBAL.read_only flag to 1.  The threshold for moving to this state is when your disk-usage is at 97%, or higher.

Once your service has been made read-only clients will receive errors when they attempt to insert, update, or delete data:

ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement  

 

Actions to make more space available

Upgrade to a larger plan

This can be done from within the Aiven console or with Aiven CLI client. New nodes with more disk capacity will be launched, and your existing data will be synced to those new nodes. Once the migration has completed the disk usage will return to below the critical level and the read-only state will be cancelled, allowing writes to be made once more.

Delete data

As your service is set in read-only mode, attempting to free disk space by deleting data will not be possible directly.  In order to disable the read-only state you'll need to use our API to temporarily remove the restriction:

  1. You can use our API and send a POST request to https://api.aiven.io/v1/project/<project>/service/<service_name>/enable-writes which will enable writes for the next 15 minutes, enabling you to free up space.   Further details are available via our API documentation. 

Got here by accident? Learn how Aiven’s hosted and managed MySQL solution will simplify your workflow:

Did this answer your question?