After a MySQL upgrade, connections to our DB from our Web tier were taking ~30 seconds. It was infuriating.
We weren’t the first to see this:
After three years of running flawlessly, out MySQL database started experiencing problems handling connections. We soon discovered that MySQL by default does a reverse DNS lookup as part of its security process. We discovered that the reverse DNS lookups performed by MySQL were either timing out or were taking a very long time (5-10 seconds). We also discovered that another peice of software- a socket service listening on port 211 began to fail as well. This was a third party product so we are not sure, but the presumption is that it must also use reverse DNS lookups.
We added valid reverses via /etc/hosts and the connections happened immediately again.
Thanks to Contegix on this one. If your company has its servers hanging out in the office, please call contegix right away and get serious (Yes, I am talking to you :).