Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Server has more TIME_WAIT connections in Apache(port 80) Post 302486143 by chandranjoy on Friday 7th of January 2011 06:52:26 AM
Old 01-07-2011
Server has more TIME_WAIT connections in Apache(port 80)

Server has more TIME_WAIT connections in Apache(port 80) Hi,
My webserver has 16GB of RAM and CentOS 5.5, Apache 2.2.3, It's shared webserver used of for webhosting. I have optmized the server as :
Code:
<IfModule prefork.c>
StartServers       8
MinSpareServers    10
MaxSpareServers   20
ServerLimit      2150
MaxClients       2000
MaxRequestsPerChild  8000
</IfModule>

Timeout 90
MaxKeepAliveRequests 100

Server is not using Worker MPM, however just assign the following values.
Code:
<IfModule worker.c>
StartServers         8
MaxClients         2150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  8000
</IfModule>

More number of TIME_WAIT Connections on server still exists.

Code:
[root@server ~]# netstat -an|grep ":80"|awk '/tcp/ {print $6}'|sort -nr| uniq -c
 1681 TIME_WAIT
      2 SYN_RECV
      4 LISTEN
      3 LAST_ACK
      7 FIN_WAIT1
      6 ESTABLISHED
      3 CLOSING

[root@server ~]# netstat -tan |grep :80|grep TIME_WAIT |wc -l
1776

Server Load Avg: 2.36, 2.45, 2.79

Please help me how to reduce the TIME_WAIT connections.

Thanks,
Jay

Last edited by radoulov; 01-07-2011 at 08:45 AM.. Reason: Code tags, please!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

close_wait connections causing a server to hung

Hi Guys, Just wondering if anyone of you have been in a situation where you end up having around 100 close_wait connections and seems to me those connections are locking up resources/processes in the server so unless the server is rebooted those processes won't be released by the close_wait... (3 Replies)
Discussion started by: hariza
3 Replies

2. Shell Programming and Scripting

How do I make multiple connections to the server in this case

Given the following code #!/usr/bin/perl -w use IO::Socket; my($handle, $line, $kidpid); $handle = IO::Socket::INET->new( PeerAddr =>"64.22.229.139", PeerPort =>"4321", Proto=>"tcp", ... (0 Replies)
Discussion started by: frequency8
0 Replies

3. Solaris

How to find the process that is using the port 80 and apache server.

How to find the process that is using the port 80 and apache server. When i used the command 'netstat -a|grep 80' it given that port 80 is in listening mode. I had used the following command: telnet localhost 80 GET / I had got some HTML script. But when I accessed the GUI ( url is... (7 Replies)
Discussion started by: vamshikrishnab
7 Replies

4. Shell Programming and Scripting

How to check if a Port is accepting connections.

Hi, I need to create a script which checks the availability of a particular service on a particular Port on HP-Unix. Is there any command in unix wherein we can check if any port is accepting the connections now. Thanks, Vihang. (5 Replies)
Discussion started by: vikings.svnit
5 Replies

5. UNIX and Linux Applications

Apache port has been shutdown and trying to up automatically

Hi All, Apache port has been shutdown and trying to up automatically but it wont start then after restart the service, its start. but ther is no log to identify the issue. can u pls let me know ur suggestion? (3 Replies)
Discussion started by: senor.ram
3 Replies

6. Web Development

How to find number of http connections active currently in apache web server

Hi I have a solaris 9 OS with apache web server running on top of it. i want to know how many http connections are active at any point in time. (In other words how many users are accessing my website it at any moment of time) How to get it..? hit counters are not required... ----------... (0 Replies)
Discussion started by: aemunathan
0 Replies

7. Web Development

Redirect to diff port on apache

Hi, I'm running both mail (webmail port = 8080) and web (http = 80) on same box. i am able to redirect as below without any problem. From: http://mail.abc.com To: http://www.abc.com:8080 I did the above with a simple virtualhost and redirect directive. But my requirement is to have same... (1 Reply)
Discussion started by: reddyr
1 Replies

8. AIX

connections on server

I am using AIX 5.3, its a application server, i am giving the support of OS & Hardware only, now i want to check how many connections are connected to my server, means how many people using my server.:confused: (4 Replies)
Discussion started by: reply.ravi
4 Replies

9. UNIX for Dummies Questions & Answers

Samba server guest connections

Hi, I am trying to comprehend Samba's behaviour on one of my Arch systems and thus I'd like to ask a couple of quick questions: The setup I'd like to build is just a small home network for file-sharing using guest connections. Here it goes, 1) When using the following settings for... (4 Replies)
Discussion started by: konos5
4 Replies

10. UNIX for Advanced & Expert Users

See AIX server remote connections

Good morning, Is there any command to view remote conxiones an AIX server? Thank you very much and best regards. (1 Reply)
Discussion started by: systemoper
1 Replies
Session::Postgres(3)					User Contributed Perl Documentation				      Session::Postgres(3)

NAME
Apache::Session::Postgres - An implementation of Apache::Session SYNOPSIS
use Apache::Session::Postgres; #if you want Apache::Session to open new DB handles: tie %hash, 'Apache::Session::Postgres', $id, { DataSource => 'dbi:Pg:dbname=sessions', UserName => $db_user, Password => $db_pass, Commit => 1 }; #or, if your handles are already opened: tie %hash, 'Apache::Session::Postgres', $id, { Handle => $dbh, Commit => 1 }; DESCRIPTION
This module is an implementation of Apache::Session. It uses the Postgres backing store and no locking. See the example, and the documentation for Apache::Session::Store::Postgres for more details. USAGE
The special Apache::Session argument for this module is Commit. You MUST provide the Commit argument, which instructs this module to either commit the transaction when it is finished, or to simply do nothing. This feature is provided so that this module will not have adverse interactions with your local transaction policy, nor your local database handle caching policy. The argument is mandatory in order to make you think about this problem. AUTHOR
This module was written by Jeffrey William Baker <jwbaker@acm.org>. SEE ALSO
Apache::Session::File, Apache::Session::Flex, Apache::Session::DB_File, Apache::Session::Postgres, Apache::Session perl v5.12.1 2007-09-28 Session::Postgres(3)
All times are GMT -4. The time now is 06:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy