2

We are facing a strange problem from last few days between our application server and database server(Mysql): connection to database server from application server hangs in SYN_SENT state and after that we are not able to make any connection to database server on mysql port(3306). When we checked the netstat output on database server its in SYN_RECV state.

What I can figure out is mysql server is receiving the SYN request and responding also and its not reaching to the client hence SYN_RECV at server side and SYN_SENT at client side. I think SYN_SENT state should go after some time and because of this other db connection attempts to same server should not hang.

Does anybody have any idea how can we resolve this issue?

Out setup details :

Application server: RHEL 5.4, kernel-release = 2.6.18-164.el5, x86_64

Database server: Mysql Version : 5.1.49 RHEL 5.4, kernel-release = 2.6.18-164.el5, x86_64

Khaled
  • 36,533
  • 8
  • 72
  • 99
Sunil
  • 21
  • 2
  • Sounds like the stateful firewall is out of connection slots. What's the output of `/sbin/sysctl -a net.netfilter| egrep "track_max|track_count"`? – David Schwartz Apr 07 '12 at 12:52
  • These parameters are not present in sysctl output, just for information: selinux and iptables are disabled on the server. – Sunil Apr 09 '12 at 08:21

1 Answers1

0

I had this problem with my provider in evenings. It looks like some router in the chain between you and target host doesn't proper work with tcp_sack. The solution is to disable it in /etc/sysctl.conf

net.ipv4.tcp_sack = 0

But this is very bad for server, because it will slow down tcp connections. You should make abuse to your provider

puchu
  • 126
  • 2
  • This must not be a router issue. It could be resulting from an attack or a broken client (Apple devices like iPhone and iPad has this issue for example) – Thomas Berger Oct 17 '12 at 12:24