Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 172.16.1.0/24 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?

share|improve this question
add comment

3 Answers 3

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.

share|improve this answer
    
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
add comment

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.

-Tony

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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