Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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
add comment
up vote 0 down vote accepted

Yes, they are successive connection errors

share|improve this answer
add comment

Your Answer

 
discard

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.