A Confused Programmer's Blog

This blog is dedicated to C# programming that I happen to do for living – with accent on curious cases and with sincere intent to make the world a better place as a result

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.

One Response so far.

  1. Hector says:

    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.

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Getting rid of Error

Since I upgraded my Windows 8 to Windows 10, I ...

Bypassing EULA step

We are working on automated testing of virtual appliance. This appliance ...

How I got rid of "Ac

OVF is a VMware virtual appliance format which allows you ...

My use-case of Perfo

In my blog I am set on a mission to ...

Connection to VIM AP

I rarely post about the issues I am experiencing in ...

Twitter updates

RSS not configured