Dan Mandel
Dan Mandel

Reputation: 747

How to debug "ER_HOST_IS_BLOCKED: Host 'abc' is blocked because of many connection errors" error

A quick Google search returns many results for fixing this error, but from what I can tell none of them give advice on how to discover the root cause. My understanding is that it happens whenever my application reaches a limit on the number of consecutive failures when connecting to the database. However, I can't figure out a way to determine the source of these failures. Is there a way to list the failed queries or connection attempts that led to this error? Ideally I would be able to determine whether this was due to a simple network failure, bad inputs, etc.

Upvotes: 1

Views: 1911

Answers (1)

Marc Alff
Marc Alff

Reputation: 8395

For every possible root cause, a dedicated column in table performance_schema.host_cache will show how many time each root cause was found.

To investigate, simply execute:

SELECT * FROM performance_schema.host_cache

See the manual: https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/host-cache-table.html

Upvotes: 1

Related Questions