LinuxQuestions.org
Visit Jeremy's Blog.
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 03-13-2008, 10:13 PM   #1
qqqson
LQ Newbie
 
Registered: May 2006
Posts: 10

Rep: Reputation: 0
httpd not responding


i am using centos 5.1
httpd-2.2.3-11.el5_1.centos.3

httpd failed to respond after running continously for a week (the no.
of pids are increasing). cpu and memory usage are very low. httpd is not
consuming cpu and memory.

But, there are a lot of pids which seems to be abnormal. After httpd
restarted, everything back to normal.

**** httpd.conf (default) ***
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>

****** when httpd is functioning well ****
[root@localhost httpd]# service httpd status
httpd (pid 4595 4594 4593 4592 4591 4590 4589 4588 4585) is running...


****** after running for a week *****
****** httpd fails to respond ****
[root@localhost ~]# service httpd status
httpd (pid 32306 32305 32303 32300 32299 32283 32272 32270 32269 32268
32267 32266 32265 32264 32262 32254 32253 32251 32232 32231 32222
32220 32215 32208 32207 32204 32199 32191 32190 32188 32167 32152 32151
32148 32147 32146 32145 32143 32138 32137 32134 32132 32130 32128 32122
32110 32109 32105 32099 32094 32074 32073 32072 32071 32069 32068 32066
32063 32062 32061 32060 32058 32054 32050 32046 32043 32038 32031 32027
32026 32025 32024 32023 32022 32021 32020 32019 32018 32017 32014 32013
32009 32007 32004 32001 31997 31996 31995 31994 31993 31991 31990
31989 31988 31985 31977 31976 31972 31968 31967 31964 31959 31958 31957
31955 31952 31951 31948 31945 31944 31941 31937 31931 31927 31923 31919
31915 31912 31908 31906 31903 31902 31901 31900 31895 31892 31884 31878
31871 31868 31859 31851 31849 31848 31847 31846 31845 31844 31841 31839
31838 31837 31836 31834 31833 31832 31823 31821 31810 31790 31789 31788
31778 31777 31773 31772 31771 31770 31768 31766 31763 31760
31759 31758 31756 31755 31752 31749 31745 31744 31742 31740 31739
31738 31736 31732 31728 31724 31714 31711 31699 31695 31690 31682 31678
31677 31676 31674 31672 31670 31668 31665 31664 31663 31662 31661 31660
31659 31643 31639 31638 31637 31635 31634 31632 31629 31628 31627 31625
31622 31619 31617 31615 31610 31605 31604 31594 31593 31592 31591 31590
31589 31587 31582 31580 31579 31578 31577 31576 31575 31574 31570 31566
31565 31564 31563 28366 27833 25815 9414 9392 9362 9322 9272 9252 9250
9186 9159 9080 9076 9069 9054
9030 9025 9006 8940 8937) is running...


Pls kindly advise.
 
Old 03-13-2008, 10:35 PM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
I tried to look for the meaning of ServerLimit, MaxClients, MaxRequestsPerChild and i got this page:
http://agiletesting.blogspot.com/200...ance-tips.html

Before searching, I thought that you should lower your ServeLimit and/or MaxClients but now since you've said that cpu and memory usage are very low, I think increasing those numbers will help your server performance. What I mean is that perhaps there's a ratio of performance in httpd that if you increase the numbers, that ratio will also increase. Just try anyway. Nothing will be lost.
 
Old 03-14-2008, 10:01 PM   #3
qqqson
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
thanks for your reply.

I have been using fedora 4 for a few years and apache was running without problem. Recently, I migrated to centos 5.1.

For centos, I suspect that the number of httpd processes should change dynamically according to server load. It simply increases (to the max limit) but do not decrease so that may lock up the server.

For fedora, I never observed that the number of httpd processes increased to max limit.

/var/log/messages or /var/log/httpd/* do not show anything special related to httpd
 
Old 03-14-2008, 11:37 PM   #4
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by qqqson View Post
/var/log/messages or /var/log/httpd/* do not show anything special related to httpd
most of the time we won't see all the info we wanted in the logs.
 
Old 03-20-2008, 03:53 AM   #5
qqqson
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
netstat -a|grep http

shows numerous connections:

*** partial listing ***
tcp 0 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:esl-lm ESTABLISHED
tcp 0 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:impera ESTABLISHED
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:centra CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.10:gat-lmd CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.:gtegsc-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.10:vdmplay CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:dwf CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.:slingshot CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89:bcs-broker CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.10:apri-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.:hb-engine CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109ra-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:l2tp CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.1:mps-raft CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.:rsvp-encap-2 CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.:rsvp-encap-1 CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:rrisat CLOSE_WAIT
tcp 394 0 ::ffff:192.1.254.62:http ::ffff:218.188.152.24:17492 ESTABLISHED
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.1:csbphonemaster CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:hks-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.:h323hostcall CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.:h323gatestat CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.1:fj-hdnet CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:xmsg CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.10:sesi-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.1:conferencetalk CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89:valisys-lm CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.:registrar CLOSE_WAIT
tcp 1 0 ::ffff:192.1.254.62:http ::ffff:116.19.89.109:dca CLOSE_WAIT
 
Old 03-20-2008, 05:13 AM   #6
qqqson
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I figured out that all connections are related to squirrelmail webmail

squirrelmail-1.4.8-4.0.1.el5.centos.2

close_wait means that the connection is closed by remote side but waiting for local application to close.
 
Old 04-18-2008, 04:27 AM   #7
dedexes
LQ Newbie
 
Registered: Jul 2007
Posts: 21

Rep: Reputation: 16
I have the same problem.

result from top

apache error log.
[error] server reached MaxClients setting, consider raising the MaxClients setting

Apache stopped responding.

When i restarted apache everything worked fine.

how to fix this problem?

it is my configuration file:
<IfModule mpm_prefork_module>
StartServers 15
MinSpareServers 8
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>


please help me.

Last edited by dedexes; 04-18-2008 at 04:39 AM.
 
  


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
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
cronjob to restart httpd if httpd is dead heropage Linux - Software 1 10-31-2007 01:22 PM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 10:31 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

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

All times are GMT -5. The time now is 03:11 PM.

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