Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for MySQL®
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
    • General questions
    • Questions about MySQL
    • Connection
    • Cluster read/write issues
    • Performance issues
    • Updating a cluster
    • Monitoring and logs
    • Migration/transfer
    • Configuring MySQL
    • All questions on a single page
  1. FAQ
  2. Cluster read/write issues

Cluster read/write issues

Written by
Yandex Cloud
Updated at December 11, 2024
  • Why are cluster writes failing?

  • What causes a replica to lag?

  • Why is the cluster size much greater than the amount of data stored?

  • What should I do if I encounter any other application error?

Why do cluster writes fail?Why do cluster writes fail?

  1. If database storage is 95% full, the cluster will switch to read-only mode. Check the amount of free space in your storage and increase the storage size as required. To check the amount of free space:
    1. Go to the folder page and select Managed Service for MySQL.
    2. Click the cluster name and go to the Monitoring tab.
    3. Check the Disk usage chart.
  2. Make sure that the host being written to is the master rather than a replica.

What causes a replica to lag?What causes a replica to lag?

  1. Check that the slave_rows_search_algorithms parameter is set to INDEX_SCAN,HASH_SCAN.
  2. For large tables, we recommend using the pt-online-schema-change utility from the Percona Toolkit rather than ALTER TABLE statements to avoid locking.
  3. If the lag persists, enable parallel replication. To do this, configure the following parameters:
    slave_parallel_type=LOGICAL_CLOCK
    slave_parallel_workers=8
    
  4. Run the SHOW SLAVE STATUS; command on the replica. If the value of Executed_Gtid_Set remains unchanged for a long time, make sure all the tables have indexes.
  5. If data is continuously written to the DB, and the host has 8GB RAM or more, we recommend increasing innodb_log_file_size up to 1 or 2 GB (parameter updates apply on server restart).

Why is the cluster size a lot larger than the amount of data it stores?Why is the cluster size a lot larger than the amount of data it stores?

This happens because of the way MySQL® stores data and not because of Managed Service for MySQL® in Yandex Cloud. Factors affecting storage space usage:

  • Fragmentation.
  • Index fill factor.
  • Rollback segment storage.
  • Type packaging.

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?What should I do in case of an application error?

  1. Check whether there is space available on the disk hosting your cluster:
    1. Go to the folder page and select Managed Service for MySQL.
    2. Click the cluster name and go to the Monitoring tab.
    3. Check the Disk usage chart.
  2. Check host monitoring charts:
    1. Go to the folder page and select Managed Service for MySQL.
    2. Click the name of the cluster you need and select the Hosts tab.
    3. Go to the Monitoring page.
    4. Find the problem resource: its chart will be approaching or will have crossed the boundary.
    5. Select the other hosts from the drop-down list and check them as well.
  3. Check the virtual machine or the server running the application connecting to your database for available resources.

Was the article helpful?

Previous
Connection
Next
Performance issues
Yandex project
© 2025 Yandex.Cloud LLC