Every old mansion has some old history, and the older it is, the scarier it gets ...
MySQL is no exception: there are some very old ghosts still lurking inside the server.
One of these ghosts is the 'host cache', which haunts the server main entrance halls, just right pass the TCP/IP front door.
How long has this ghost been there ? From the very beginning it seems, as is was first spotted on April 26, 2006 ... Yes, that was 6 years ago, back in the 4.1 old times.
This ghost has been haunting DBA's worst nightmares since then.
Public sightings include:
- Bug#22821 Adding "SHOW HOST_CACHE" patch from Jeremy Cole
- Bug#24906 No command to monitor blocked hosts
- Bug#45817 Please add SHOW command for inc_host_errors(max_connect_errors)
- Bug#50963 add information_schema.error_count
- Bug#59404 More info from host cache
- http://www.facebook.com/notes/mysqlfacebook/monitoring-for-errors/293204560932
Why is the host cache a ghost ?
Because it can not be seen. But make no mistake, it is there, waiting to scare database connections away.
Why is it causing nightmares ?
Because it is speechless (no trace in the log), very stealthy (some people do not know it is there), and yet deadly effective at killing visitors, without telling anyone.
And definitely without telling any living soul.
If an application ever sees something like this, then you know this application really did upset the ghost too much, which is now seeing red and killing at first sight.
That last part, the fact that the ghost actually has a spirit of it's own, and will remember an annoying visitor, is what makes it the worst: troubleshooting a system that show some hysteresis, while staying completely in the dark, is no fun at all.
The only thing the host cache ghost would tell anyone, just as a final reminder that is is still lurking, is how many visitors got killed.
No when, no why, no who ... just a casualty report.
While keeping unwanted visitors out might be a good thing after all, also preventing wanted but poorly configured visitors to connect to the database is really a bad thing.
This is why this old ghost from the past has now finally been put to rest, thanks to the performance schema in the MySQL 5.6.5-m8 release: see the new table performance_schema.host_cache.
With the new performance_schema.host_cache table, not only a DBA can see the host cache content, but the content has been expanded to also see a count for every possible error that can prevent a visitor to get in.
Finally some light in that entrance hall.
Now, we are still in April 2012, and this feature is 6 years overdue, but don't get fooled ... this is not a faery tale.
The fact that such things can happen might be a reason to believe in Santa Claus again.
Marc Alff, Oracle.
PlanetMySQL Voting: Vote UP / Vote DOWN
MySQL is no exception: there are some very old ghosts still lurking inside the server.
One of these ghosts is the 'host cache', which haunts the server main entrance halls, just right pass the TCP/IP front door.
How long has this ghost been there ? From the very beginning it seems, as is was first spotted on April 26, 2006 ... Yes, that was 6 years ago, back in the 4.1 old times.
This ghost has been haunting DBA's worst nightmares since then.
Public sightings include:
- Bug#22821 Adding "SHOW HOST_CACHE" patch from Jeremy Cole
- Bug#24906 No command to monitor blocked hosts
- Bug#45817 Please add SHOW command for inc_host_errors(max_connect_errors)
- Bug#50963 add information_schema.error_count
- Bug#59404 More info from host cache
- http://www.facebook.com/notes/mysqlfacebook/monitoring-for-errors/293204560932
Why is the host cache a ghost ?
Because it can not be seen. But make no mistake, it is there, waiting to scare database connections away.
Why is it causing nightmares ?
Because it is speechless (no trace in the log), very stealthy (some people do not know it is there), and yet deadly effective at killing visitors, without telling anyone.
And definitely without telling any living soul.
If an application ever sees something like this, then you know this application really did upset the ghost too much, which is now seeing red and killing at first sight.
That last part, the fact that the ghost actually has a spirit of it's own, and will remember an annoying visitor, is what makes it the worst: troubleshooting a system that show some hysteresis, while staying completely in the dark, is no fun at all.
The only thing the host cache ghost would tell anyone, just as a final reminder that is is still lurking, is how many visitors got killed.
No when, no why, no who ... just a casualty report.
While keeping unwanted visitors out might be a good thing after all, also preventing wanted but poorly configured visitors to connect to the database is really a bad thing.
This is why this old ghost from the past has now finally been put to rest, thanks to the performance schema in the MySQL 5.6.5-m8 release: see the new table performance_schema.host_cache.
With the new performance_schema.host_cache table, not only a DBA can see the host cache content, but the content has been expanded to also see a count for every possible error that can prevent a visitor to get in.
Finally some light in that entrance hall.
Now, we are still in April 2012, and this feature is 6 years overdue, but don't get fooled ... this is not a faery tale.
The fact that such things can happen might be a reason to believe in Santa Claus again.
Marc Alff, Oracle.
Image may be NSFW.
Clik here to view.
Clik here to view.

PlanetMySQL Voting: Vote UP / Vote DOWN