---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.4
alternate:
  - https://ydb.tech/docs/en/troubleshooting/performance/queries/overloaded-errors.md
  - https://ydb.tech/docs/ru/troubleshooting/performance/queries/overloaded-errors.md
sourcePath: en/core/troubleshooting/performance/queries/overloaded-errors.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Overloaded errors

YDB returns `OVERLOADED` errors in the following cases:

* Overloaded table partitions with over 15000 queries in their queue.

* The outbound [CDC](https://ydb.tech/docs/en/concepts/glossary.md#cdc) queue exceeds the limit of 10000 elements or 125 MB.

* Table partitions in states other than normal, for example partitions in the process of splitting or merging.

* The number of sessions with a YDB node has reached the limit of 1000.

## Diagnostics

<!-- The include is added to allow partial overrides in overlays  -->
<!-- source: en/troubleshooting/performance/queries/_includes/overloaded-errors.md -->
1. Open the **[DB overview](https://ydb.tech/docs/en/reference/observability/metrics/grafana-dashboards.md#dboverview)** Grafana dashboard.

1. In the **API details** section, see if the **Soft errors (retriable)** chart shows any spikes in the rate of queries with the `OVERLOADED` status.

    ![](_assets/soft-errors.png)

1. To check if the spikes in overloaded errors were caused by exceeding the limit of 15000 queries in table partition queues:

    1. In the [Embedded UI](https://ydb.tech/docs/en/reference/embedded-ui/index.md), go to the **Databases** tab and click on the database.

    1. On the **Navigation** tab, ensure the required database is selected.

    1. Open the **Diagnostics** tab.

    1. Open the **Top shards** tab.

    1. In the **Immediate** and **Historical** tabs, sort the shards by the **InFlightTxCount** column and see if the top values reach the 15000 limit.

1. To check if the spikes in overloaded errors were caused by tablet splits and merges, see [Excessive tablet splits and merges](https://ydb.tech/docs/en/troubleshooting/performance/schemas/splits-merges.md).

1. To check if the spikes in overloaded errors were caused by exceeding the 1000 limit of open sessions, in the Grafana **[DB status](https://ydb.tech/docs/en/reference/observability/metrics/grafana-dashboards.md#dbstatus)** dashboard, see the **Session count by host** chart.

1. See the [overloaded shards](https://ydb.tech/docs/en/troubleshooting/performance/schemas/overloaded-shards.md) issue.
<!-- endsource: en/troubleshooting/performance/queries/_includes/overloaded-errors.md -->

## Recommendations

If a YQL query returns an `OVERLOADED` error, retry the query using a randomized exponential back-off strategy. The YDB SDK provides a built-in mechanism for handling temporary failures. For more information, see [Handling errors](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md).

Exceeding the limit of open sessions per node may indicate a problem in the application logic.
