Too Many ESTABLISHED connection from a single IP address in Apache
- by ananthan
netstat -ntp |grep 80 shows too many ESTABLISHED connection from single IP address. Around 300 of them and it is not an attack and user is using a 2G connection to access Apache. This is the case with other 2G connections also. As a result of this Apache is running out of children.
Earlier it was showing too many close_wait and after enabling
tcp_tw_reuse and tcp_tw-recycle there is not much close_wait but the number of ESTABLISHED connections increased.
We are using Ubuntu 11.04 having 48 GB ram
keepalive On
keepalive timeout 10
max clients 800
max-request-perchild 4000
timeout 300
I have set syn_ack to 1 and syn_retries to 2.
On wifi there is no such issue. Connections are closing properly, but with 2G connections Apache is running out of children and too many ESTABLISHED connection.
also i have tried setting timeout from default 300 to 30,but since our project is image hosting for mobile phones,clients couldn't upload images properly as they are getting frequent time out.Also there were a lot of 408 messages so changed it to the default 300