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.

I am using 10EC2 Instances behind 1 ELB. And ELB configured 80 to 8080 and 443 to 8080 port.

And all 10EC2 instances having installed with Apache Tomcat, total request on ELB around 8000 to 10000 in 1 minute.

I am facing problem for CLOSE_WAIT connection on 10 EC2 Instance, having Apache Tomcat.

EC2 Instance Type : m1.xlarge

When we restart the Apache Tomcat, all CLOSE_WAIT connections are lost, but its not proper way to work on Production Instances.

Please help me out.

share|improve this question

3 Answers 3

This is a variant of the problem described here: http://unix.stackexchange.com/questions/10106/orphaned-connections-in-close-wait-state Does your application have many mobile clients? These clients, connecting over unreliable networks, can do crazy things with TCP states.

The simplest way to handle it is to reboot your apache instances in a rolling fashion - say, one server each 30 minutes. If you have enough instances behind your ELB then the net effect on your service should be bearable.

share|improve this answer
    
Earlier, all of the clients on the Internet were connecting over rather unreliable and slow networks and TCP states weren't gone crazy. ) –  poige May 27 '13 at 11:16

Check out cutter.

Cutter is a tool for linux-based firewalls that allows connections passing through them to be forcably [sic] aborted by the firewall administrator.

share|improve this answer

Some clients don't properly close the TCP connection when their done. That's out of your control. These generally time out after a bit, and don't create too much of a problem, other than cluttering the listing you get from netstat -an and similar.

So, why you are having a problem with it?

This might be pertinent: What limits the maximum number of connections on a Linux server?

share|improve this answer

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.