LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-27-2014, 12:51 AM   #1
mitter1989
Member
 
Registered: Sep 2013
Posts: 47

Rep: Reputation: Disabled
Question apache too many CLOSE_WAIT/TIME_WAIT


Hi Folks,

How can we decrease COSE_WAIT and TIME_wAIT issue...

4042 CLOSE_WAIT
1158 ESTABLISHED
3 FIN_WAIT1
124 FIN_WAIT2
11 LAST_ACK
7048 TIME_WAIT
 
Old 02-27-2014, 02:17 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Why do you believe these to be a problem to address?

There are plenty of ways to ditch them faster, but if there's no issue, why?

see, for example -http://ihazem.wordpress.com/2012/02/07/reducing-time_wait-socket-connections-recyclereuse/
 
Old 02-27-2014, 04:54 AM   #3
mitter1989
Member
 
Registered: Sep 2013
Posts: 47

Original Poster
Rep: Reputation: Disabled
Due to this my apache connection reached to maximum defined level and new user can not access web site :

Please see below :

pstree |egrep -i 'httpd'
|-httpd---7425*[httpd]


These many conncections from sigle IP, I have blocked these IPs with iptables but still showing by netstat command, kindly suggest how can I block them.


# netstat -tunp |grep http | awk '{print $5}' |grep -v " " | cut -d':' -f 4 |sort |uniq -c |sort -n |tail
86 190.184.144.62
92 202.138.249.22
92 60.220.212.60
94 190.184.144.53
105 58.242.249.31
111 162.243.233.19
119 151.200.170.21
306 187.111.202.13
529 178.213.187.17

# iptables -nvL |grep 178.213.187.17
0 0 DROP all -- * * 178.213.187.17 0.0.0.0/0

# iptables -nvL |grep 187.111.202.13
0 0 DROP all -- * * 187.111.202.13 0.0.0.0/0
 
Old 02-27-2014, 06:08 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
are you asking for iptables help of tcp stack tuning help? I'd guess you put that iptables rule after the rule that's permitting them, but without the full ruleset we've naturally no idea. As for tuning, I alrady provided a link.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache and CLOSE_WAIT connections jan5134 Linux - Software 1 09-26-2012 07:20 AM
Server has more TIME_WAIT connections in Apache(port 80) chandranjoy Linux - Server 1 01-07-2011 07:11 AM
TIME_WAIT and CLOSE_WAIT echox Linux - Enterprise 1 09-03-2006 09:26 PM
Close_wait ghodkiller Linux - Networking 0 01-08-2005 04:44 PM
Close_wait adoyee Programming 1 02-11-2004 11:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration