> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/system-variables/handling-too-many-connections.md).

# Handling Too Many Connections

Systems that get too busy can return the `too_many_connections` error.

When the number of [threads\_connected](/docs/server/server-management/variables-and-modes/server-status-variables.md#threads_connected) exceeds the [max\_connections](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_connections) server variable, it's time to make a change. Viewing the [threads\_connected](/docs/server/server-management/variables-and-modes/server-status-variables.md#threads_connected) status variable shows only the current number of connections, but it's more useful to see what the value has peaked at, and this is shown by the [max\_used\_connections](/docs/server/server-management/variables-and-modes/server-status-variables.md#max_used_connections) status variable.

This error may be a symptom of slow queries and other bottlenecks, but if the system is running smoothly this can be addressed by increasing the value of max\_connections.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
