> 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/reference/error-codes/mariadb-error-codes-1100-to-1199/e1129.md).

# Error 1129: Host is blocked because of many connection errors

| Error Code | SQLSTATE | Error                 | Description                                                                                      |
| ---------- | -------- | --------------------- | ------------------------------------------------------------------------------------------------ |
| 1129       | HY000    | ER\_HOST\_IS\_BLOCKED | Host '%s' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts' |

## Possible Causes and Solutions

The server counts failed connection attempts from each host. When a host reaches [max\_connect\_errors](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_connect_errors) (100 by default) failed attempts in a row, the server refuses all further connections from it, with this error:

```
ERROR 1129 (HY000): Host '192.0.2.10' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
```

Only failures during the connection handshake count, before the client has logged in, for example:

* A health check of a load balancer or monitoring tool that opens a TCP connection and closes it without logging in.
* A port scanner, or a client that isn't a MariaDB client.
* A client that times out during the handshake, for example over a slow or unreliable network.

Wrong passwords and unknown users don't count. They give [error 1045](/docs/server/reference/error-codes/mariadb-error-codes-1000-to-1099/e1045.md) instead. A successful connection from the host resets its count to zero.

Connections from `127.0.0.1`, `::1` and the local socket are never blocked. Hosts are counted only while [skip\_name\_resolve](/docs/server/server-management/variables-and-modes/server-system-variables.md#skip_name_resolve) is OFF, because the count is kept in the host cache, which is used for resolving host names.

To solve the error:

* Unblock the host by clearing the host cache, with [FLUSH HOSTS](/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush.md), or `mariadb-admin flush-hosts` from the command line. With the Performance Schema enabled, the [host\_cache table](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-host_cache-table.md) shows the counts per host, and `TRUNCATE performance_schema.host_cache` also clears them.
* Fix the cause. Configure the health check to log in, for example with a dedicated account.
* If the failures are expected, raise `max_connect_errors`. The new value applies right away.

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

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