1

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.

Dan Mandel
  • 637
  • 1
  • 8
  • 26
  • How much RAM? Please provide `SHOW VARIABLES;` and `SHOW GLOBAL STATUS;`. There may be additional clues from the _type_ of connection error(s). – Rick James Dec 09 '19 at 19:05
  • @RickJames I'll try that, thank you. This isn't my app and I'll need to request permission for devops to execute those commands. – Dan Mandel Dec 10 '19 at 14:19
  • Maybe the app keep on opening new connections? We ever experienced that some of our in-house testing apps keeps on opening new connection to our test MySQL server. – FanoFN Dec 13 '19 at 07:14

1 Answers1

1

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

Marc Alff
  • 8,227
  • 33
  • 59