LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-06-2010, 04:26 AM   #1
sokha
Member
 
Registered: Sep 2008
Posts: 46

Rep: Reputation: 15
CentOS 5.3 - Too many httpd process


Today, my website was down. I checked in the process list. There are so many httpd process (apache 2). It never happens before. I do not know how to solve it.

This is the result from uptime:

Quote:
17:22:49 up 1:00, 1 user, load average: 97.68, 127.49, 122.91
Anybody has such problem before?
 
Old 01-06-2010, 05:04 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 248Reputation: 248Reputation: 248
Greetingz!

Well, for starters, you're server has only been online for about an hour. As for your load averages, sheesh!

When you do a "ps -ef | grep http | wc -l", what number do you get?

You may need to check your httpd.conf file. I would recommend running the following command to get the "meat" of your configuration

grep -v "^#" /etc/httpd/conf/httpd.conf | grep .
(This strips out comments, the removes blank lines)

You should pay attention to the following values (I've included my settings, as I run a small public website, too);

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
 
1 members found this post helpful.
Old 01-06-2010, 05:05 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,223

Rep: Reputation: 132Reputation: 132
Quote:
Too many httpd process
Its because of too many http traffic hit your webserver so investigate how such traffic hit your server. May be its because of DoS attack or do you have any ruff idea how many http request hit your server per second?
 
1 members found this post helpful.
Old 01-06-2010, 10:28 AM   #4
sokha
Member
 
Registered: Sep 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Thank you guys. Finally, I found out why httpd was overloaded. It's because there was one php script bug and one bad guy was trying to open that bug URL every second.

I found out other people have the same problem like mine here: http://simpleportal.net/index.php?topic=4168.0
 
Old 01-07-2010, 09:34 AM   #5
zokken
Member
 
Registered: Oct 2008
Posts: 34

Rep: Reputation: 15
We experience a similar problem every so often on a Redhat box. The MaxClients limit is reached and Apache stops serving pages. Increasing the limit doesn't solve the problem, and the average number of connections when things are running smoothly is much, much lower than this setting anyway.

To hold us over, I've written a script that checks the number of httpd processes every 5-10 minutes (forget how often off the top of my head). If it gets too high, it sends out a report containing the output of top and ps and restarts Apache in order to prevent it from crashing. It seems like a crude solution, but it tends to keep the site up until the problem passes.

Quote:
Thank you guys. Finally, I found out why httpd was overloaded. It's because there was one php script bug and one bad guy was trying to open that bug URL every second.
Is it really that simple to DoS a web server? Does that mean someone could conceivably keep clicking on links on a site as fast as possible and have the server grind to a halt?

Last edited by zokken; 01-07-2010 at 09:36 AM.
 
Old 03-10-2010, 10:58 PM   #6
sokha
Member
 
Registered: Sep 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by zokken View Post
Is it really that simple to DoS a web server? Does that mean someone could conceivably keep clicking on links on a site as fast as possible and have the server grind to a halt?
Yes, it's kind of. I checked at the log and found out there were one bad guy trying to click a link (where it had that bug) every second.
 
Old 03-11-2010, 11:50 AM   #7
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Quote:
Originally Posted by sokha View Post
Thank you guys. Finally, I found out why httpd was overloaded. It's because there was one php script bug and one bad guy was trying to open that bug URL every second.

I found out other people have the same problem like mine here: http://simpleportal.net/index.php?topic=4168.0
OMG, a Joomla vulnerability!!
 
Old 03-12-2010, 01:31 AM   #8
sokha
Member
 
Registered: Sep 2008
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nowonmai View Post
OMG, a Joomla vulnerability!!
A Joomla vulnerability? I do not understand. It's about Simplemachines and Simpleportal, why Joomla?
 
  


Reply

Tags
centos, httpd, overloaded


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to Compile httpd-2.2.13 on CentOS 5.3? k_oudom Linux - Software 18 09-17-2009 02:23 AM
(CentOS 5.3 server) httpd.conf configuration issue involving DirectoryIndex xshad0wfx Linux - Server 4 06-19-2009 10:32 PM
httpd-perl process eating memory..Help! onalos Linux - General 1 07-21-2007 06:16 PM
httpd is spawn many process & sucking bandwidth bdragon Linux - General 4 06-10-2006 01:43 PM
how do I make httpd a process that runs on startup Belkorin Linux - Software 4 07-09-2004 02:32 PM


All times are GMT -5. The time now is 08:56 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration