Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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. 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?

share|improve this question

Does mysql connection error count ever flush?

No. The client host will be blocked until you execute a mysqladmin flush-hosts command or restart the MySQL server.

share|improve this answer
Thanks for the reply. The question is proactive and asking will the number of connection errors continue to increase before the host is blocked. I get the impression that if we expect very high traffic I will need to script a FLUSH every month – KCD Feb 24 '13 at 19:12
up vote 0 down vote accepted

Yes, they are successive connection errors

share|improve this answer
maybe this is related – tigger May 31 '15 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.