One of the products that I am working with uses MySQL database located at the Ubuntu host remotely connected by .NET based web service. For a long time, web service had been suffering from MySQL long response times. We tried different solutions, like connection pooling, all in vain. Yesterday, the situation worsened and web services started failing with connection timeout. When we tried connect using tools like Toad and Navicat, we saw severe delays in server’s response:
Apparently, the problem was with client host name resolving that MySQL performs when a new connection comes in. For some reason, reverse DNS resolving on server ceased to work:
So, the quick fix work-around we implemented was to edit /etc/hosts
file, by adding an entry for the host accommodating web service. Another solution would be to set --skip-name-resolve
option to disable reverse host name resolving, until our brave IT men resolve the issue of reverse DNS configuration. At the moment, our web services work lightening fast and we are considering keeping /etc/hosts
record even after DNS issues will be resolved, since the client has static IP address. If you are having a problem of large delays upon accepting new MySQL connection – our case might just be explanation for your problem.
What did you exactly write on /etc/hosts? I am having the same problem, but don’t know what should I write near its IP.