[Yandex Cloud documentation](../index.md) > [Yandex Managed Service for MySQL®](index.md) > Inspections and recommendations

# Inspections and recommendations in Managed Service for MySQL® 

Managed database clusters regularly undergo diagnostics to detect possible issues, increase the cluster's reliability, and improve its performance. The results of such checks are displayed as inspections under **Recommendations**. You can see notifications about successful checks and recommendations on eliminating discovered risks. The responsibility to troubleshoot any detected issues lies within the Yandex Cloud user's [remit](../overview/concepts/mdb-responsibilities.md).

All checks have a severity level:

* High level: Criteria of high cluster availability, significant risks of reduced performance, data loss risks. Such checks warrant special attention and require following the recommendations provided. 
* Moderate level: Possible risks of reduced performance, suboptimal memory and disk space usage.
* Low level: Potential risks and cluster operation limitations.

The list of recommendations is updated regularly. For each recommendation, the following timestamps are fixed: the date of the risk's first detection and the date of the most recent status update on this issue. If the recommendation seems to be excessive or incorrect, you can hide it, specifying a reason. Once the hiding period expires, the recommendation will automatically become available again if the issue persists.

Recommendations are available at the cluster, folder, and cloud levels and provide tips for all your resources. However, the absence of recommendations does not mean that your cluster is optimized: the list of checks gets continuously appended but still remains incomprehensive and cannot replace monitoring, since it is **targeted at detecting patterns rather than specific issues**. You can additionally run cluster performance diagnostics and analyze monitoring metrics.

Managing recommendations in Managed Service for MySQL® requires the [managed-mysql.editor role or higher](security/index.md).

## Available inspections in Managed Service for MySQL® {#mmy-recommendations}

| **Category** | **Check** | **Risk** | **Severity** |
|---------------------|-------------------------------------------------------|----------------------------------------------------------------------------------------------------|-----------------|
| Performance  | CPU usage                                          | [Risk of reduced performance](#mysql_cpu_idle)                                                 | High         |
| High availability | Availability of synchronous replicas in a cluster | [Risk of data loss and cluster unavailability in the event of a zone (replica) failure](#mysql_ha_replics) | High         |
| High availability | Memory allocation                                      | [Lack of RAM](#mysql_oom)                                                          | High         |
| High availability | Allocating disk space | [Risk of cluster unavailability](#mysql_disk_free_space) | High         |
| High availability | High cluster availability during zone failure | [Risk of data loss and cluster unavailability in the event of a zone failure](#mysql_ha_zone) | High         |
| High availability | High cluster availability in the event of a zone failure (quorum) | [Risk of data loss and cluster unavailability in the event of a zone failure (quorum)](#mysql_ha_quorum) | High         |
| High availability | Disk autoscaling feature | [Disk space autoscaling is limited](#mysql_disk_autoscaling_limit) | Moderate      |

### Risk of reduced performance {#mysql_cpu_idle}

**Description**

The host continuously uses all CPU resources, which may cause delays in query processing. Check the [load](operations/performance-diagnostics.md) and optimize your queries (which may include using the WebSQL [AI assistant](../websql/operations/ai-assistant.md)) or increase the cluster's computing resources.

**Action**

To increase the cluster's computing resources:

1. Navigate to **Managed Service for&nbsp;MySQL**.
1. Select your cluster and click ![image](../_assets/console-icons/pencil.svg) **Edit**.
1. Under **Host compute resources**, select a host class with the required amount of vCPUs.
1. Click **Save changes**.

### Risk of data loss and cluster unavailability in the event of a zone (replica) failure {#mysql_ha_replics}

**Description**

The cluster uses only asynchronous replicas, which does not guarantee fault tolerance. Add at least one synchronous replica to another zone to ensure high availability.

**Action**

To migrate hosts from one availability zone to another, do the following:

1. [Create a subnet](../vpc/operations/subnet-create.md) in the target availability zone for the hosts.
1. Add a host to your cluster: [navigate](https://console.yandex.cloud/link/managed-mysql) to **Managed Service for&nbsp;MySQL**.
1. Click the cluster name and navigate to the **Hosts** tab.
1. Click ![image](../_assets/console-icons/plus.svg) Create host.
1. Specify the following host settings:

    * Target availability zone for your hosts.
    * New subnet.
    * To make the host accessible from outside Yandex Cloud, select **Public access**.

1. Click **Save**.
1. Delete the hosts in the source availability zone. 

### Not enough RAM {#mysql_oom}

**Description**

The cluster is running out of RAM, which leads to slow performance or emergency shutdowns. Increase the cluster's RAM.

**Action**

To increase the amount of RAM:

1. Navigate to **Managed Service for&nbsp;MySQL**.
1. Select your cluster and click ![image](../_assets/console-icons/pencil.svg) **Edit**.
1. Under **Host compute resources**, select a host class with the required amount of RAM.
1. Click **Save changes**.

### Risk of cluster unavailability {#mysql_disk_free_space}

**Description**

Your host is critically low on free space. Some operations may be disabled, while the whole cluster may become unavailable, i.e., switch to read-only mode. Increase the disk size or clear unused data.

**Action**

To increase the disk size:

1. Navigate to **Managed Service for&nbsp;MySQL**.
1. Select your cluster and click ![image](../_assets/console-icons/pencil.svg) **Edit**.
1. Under **Storage**, increase the disk size.
1. Click **Save changes**. 

### Risk of data loss and cluster unavailability in the event of a zone failure {#mysql_ha_zone}

**Description**

All cluster hosts are in the same availability zone. In case the zone fails, the cluster becomes unavailable. Put replicas in different zones to ensure high availability.


{% note info %}

Single-host clusters are excluded from high availability testing: Yandex Cloud users are fully responsible for managing such a configuration.

{% endnote %}

**Action**

To add a host to another zone:

1. Navigate to **Managed Service for&nbsp;MySQL**.
1. Select the cluster and open the **Hosts** tab.
1. Click **Create host**.
1. In the host parameters, specify an alternative availability zone.
1. Finish configuring the host and click **Save**.

### Risk of data loss and cluster unavailability in the event of a zone failure (quorum) {#mysql_ha_quorum}

**Description**

The number of hosts required to confirm a transaction is less than the maximum number of hosts per availability zone. To avoid data loss in case the zone fails, replace the `Rpl semi sync master wait for slave count` [value](concepts/settings-list.md#setting-rpl-wait-slave-count) with one larger than the number of host per availability zone, or migrate some of the hosts to other availability zones.

**Action**

To migrate hosts from one availability zone to another, do the following:

1. [Create a subnet](../vpc/operations/subnet-create.md) in the target availability zone for the hosts.
1. Add a host to your cluster: [navigate](https://console.yandex.cloud/link/managed-mysql) to **Managed Service for&nbsp;MySQL**.
1. Click the cluster name and navigate to the **Hosts** tab.
1. Click ![image](../_assets/console-icons/plus.svg) **Create host**.
1. Specify the following host settings:

    * Target availability zone for your hosts.
    * New subnet.
    * To make the host accessible from outside Yandex Cloud, select **Public access**.

1. Click **Save**.
1. Delete the hosts in the source availability zone.

To change the `Rpl semi sync master wait for slave count` [value](concepts/settings-list.md#setting-rpl-wait-slave-count):

1. [Navigate](https://console.yandex.cloud/link/managed-mysql) to **Managed Service for&nbsp;MySQL**.
1. Select your cluster and click **Edit** in the top panel.
1. Change the setting by clicking **Settings** under **DBMS settings**.
1. Save your changes.

For more on the quorum setting, see [MySQL® settings](concepts/settings-list.md#setting-rpl-wait-slave-count).

### Disk space autoscaling is limited {#mysql_disk_autoscaling_limit}

**Description**

The autoscaling limit has been reached, so the cluster cannot increase its disk space when needed. Update the cluster’s autoscaling settings and increase the limit.

**Action**

To update autoscaling settings:

  1. [Navigate](https://console.yandex.cloud/link/managed-mysql) to **Managed Service for&nbsp;MySQL**.
  1. Select your cluster and click **Edit** in the top panel.
  1. In the advanced **Automatic increase of storage size** cluster settings, select **In the maintenance window when full at more than** and specify the **of the current size is full** percentage to trigger a storage expansion during the next [maintenance window](concepts/maintenance.md#maintenance-window).