Cluster read/write issues
Written by
Updated at December 10, 2025
Why do cluster writes fail?
- If the database storage reaches 95% capacity, the cluster will switch to read-only mode. Check the amount of free space in your storage and increase the storage size, if required. To check the amount of free space:
- Navigate to the folder dashboard and select Managed Service for MySQL.
- Click the name of your cluster and open the Monitoring tab.
- Check the Disk usage chart.
- Make sure all writes target the master host, not a replica.
What causes a replica to lag?
- Check that
slave_rows_search_algorithmsis set toINDEX_SCAN,HASH_SCAN. - For large tables, we recommend using
pt-online-schema-changefrom the Percona Toolkit rather thanALTER TABLEstatements to avoid locking. - If the lag persists, enable parallel replication. To do this, configure the following settings:
slave_parallel_type=LOGICAL_CLOCK slave_parallel_workers=8 - Run the
SHOW SLAVE STATUS;command on the replica. If theExecuted_Gtid_Setvalue remains unchanged for a long time, make sure all the tables have indexes. - For continuous database writes on a host with 8 GB or more of RAM, we recommend increasing
innodb_log_file_sizeup to 1 or 2 GB (changing this setting requires a server restart).
Why is the cluster size a lot larger than the amount of data it stores?
This occurs because of MySQL® storage features, not due to Managed Service for MySQL® in Yandex Cloud. The following factors affect the amount of storage used:
- Fragmentation
- Index fill factor
- Rollback segment storage
- Data type packing
To find out the actual size of database tables, use the INNODB_SYS_TABLESPACES system table. For more information, see Finding MySQL table size on disk
What should I do in case of an application error?
- Check whether the disk hosting your cluster has enough free space:
- Navigate to the folder dashboard and select Managed Service for MySQL.
- Click the name of your cluster and open the Monitoring tab.
- Check the Disk usage chart.
- Check host monitoring charts:
- Navigate to the folder dashboard and select Managed Service for MySQL.
- Click the name of your cluster and open the Hosts tab.
- Go to the Monitoring page.
- Find the resource in question: its chart will be approaching or crossing the limit.
- Select the other hosts from the drop-down list and check them as well.
- Check the VM or the server running the application connecting to your database for available resources.