The problem starts to occur when the database and application server are separated into 2 different firewall segments. Database connection from the application server to the database slows down significantly. Managed to solve the problem by adding skip-name-resolve in my.ini just under [MySqld] tag.
This problem may occur because mysql try to resolve the host name from ip address but the firewall block this dns traffic. Details can be found in this url: http://dev.mysql.com/doc/refman/5.0/en/dns.html
Published with Blogger-droid v1.6.5