Mysql – Does thesql connection error count ever flush or will the host eventually get blocked

load-testingMySQLmysql5.5

During performance testing of our application I found that under extreme loads one problem that can occur is the occasional mysql connection error (i.e. at this stage I don't believe it is fair to call it a bug). Eventually the application will get blocked by mysql. I can extend the SET GLOBAL max_connect_errors=10000; (currently 10) but assuming 100% mysql uptime over a very very long time would this problem eventually reoccur?

This is the "blocked-host" feature of mysql:

Host 'host_name' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'

Without proactive intervention will the connection error count ever flush or otherwise decline?

Update

I have found conflicting information, Percona recommend a very high limit ("around 1000000 is good") implying no. But elsewhere in the documentation states only successive errors are counted meaning yes, a single successful connection will flush the error count.

8.11.5.2. DNS Lookup Optimization and the Host Cache

If too many of these occur successively from a given host without a
successful connection, the server blocks further connections from that
host. The max_connect_errors system variable determines the number of
permitted errors before blocking occurs

Is anyone running mysql 5.6.5 where host_cache is exposed or know definitively?

Best Answer

Yes, they are successive connection errors