Our web environment consists of two servers.

  1. Web front-end. Dell PowerEdge R610, RHEL 5.5, Apache 2.2.17, php 5.2.14.
  2. Database server. Dell PowerEdge R710, Windows 2008 R2 Standard x64, MySQL 5.5.11-log x64.

Normally these two work perfectly fine together. However, when I try to get them talking via a dedicated LAN on their secondary NICs (each machine has four of them), things get flaky. I have NIC #2 on both machines configured on the subnet, with no gateway or DNS servers (obviously, since it's just those two systems), and I put the private IP address of each machine into the hosts file of the other. The routing tables on both machines look okay after I do this.

I've tried this with both a crossover cable draped directly between the two NICs, and also via a dedicated vlan on the switch in the rack. In either case, I get intermittent connection problems. It's a fairly small percentage of connections that fail, but it's enough to cause a significant problem, and I have to switch back to the main network connection, which will contend with all the other traffic and hosts on the switch.

The full error message that appears in the application log:

SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 110

Am I doing something really dumb that's causing this to not work properly? Anything I can check in MySQL that would explain why it's failing to connect occasionally?


The first thing I would rule out is the packet size, not for the network, but for MySQL. Make sure you set max_allow_packet to a large enough value, especially if your website is using BLOB data.

I saw a strange forum concerning this same issue. The forum discusses something about removing or playing around with a bind address dispite remote connections.

Please look at this and see if it helps.

  • Hmm, interesting. Is it possible for that to affect only the secondary NIC and not the primary? As soon as I switch back to the primary, it works fine again.
    – db2
    May 13 '11 at 9:39

Check your logs, I recently had an identical problem and it turned out that it was a corrupted innodb namespace that was causing MySQL to lose the connection on any simple query.



MySQL error 110 seems to be "Connection timed out". Make sure, the connection works outside of MySQL (ping the other host, try telnetting to the MySQL port 3306). If this does not work, check the firewall settings on the server. Try setting the network type to "Domain profile". Otherwise Windows Server 2008 likes to behave very strange.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.