Forum Moderators: phranque

Message Too Old, No Replies

apache childs sits in RAM by doing nothing

any solution to make them exit?

         

dend

12:45 pm on May 25, 2004 (gmt 0)

10+ Year Member



Lets say now() we have 12:00

under ps aux we see a lot of apache childs started on
nobody 17603 0.0 2.0 23592 20736? S 11:39 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 17604 0.0 2.0 23576 20716? S 11:40 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 17607 0.0 2.0 23576 20716? S 11:40 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 17609 0.0 2.0 23580 20732? S 11:41 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 17615 0.0 2.0 23576 20716? S 11:41 0:00 /usr/local/apache/bin/httpd -DSSL

These Childs does nothing (I think) and only uses RAM.
Any solutions how-to make them exit in 5-10 minutes automatically?

gergoe

6:12 pm on May 26, 2004 (gmt 0)

10+ Year Member



I'm really not familiar with linux, but it was told me by a linux expert when I asked the same question from him that it is normal that there are a lot of apache child processes sitting in the memory. I think those processes are the child processes; unlike on the win32 platform where there's only one child process running for all the serving threads. Check out the apache docs, you might find some details about this in it.

incywincy

6:19 pm on May 26, 2004 (gmt 0)

10+ Year Member



I believe this to be normal, my Linux webserver show the following

root 5912 1 0 May24? 00:00:04 /usr/sbin/httpd -D SSL
web 21814 5912 0 04:06? 00:00:08 /usr/sbin/httpd -D SSL
web 21815 5912 0 04:06? 00:00:09 /usr/sbin/httpd -D SSL
web 21816 5912 0 04:06? 00:00:09 /usr/sbin/httpd -D SSL
web 21817 5912 0 04:06? 00:00:09 /usr/sbin/httpd -D SSL
web 21977 5912 0 04:07? 00:00:08 /usr/sbin/httpd -D SSL
web 21979 5912 0 04:07? 00:00:09 /usr/sbin/httpd -D SSL
web 1697 5912 0 06:01? 00:00:09 /usr/sbin/httpd -D SSL
web 13256 5912 0 07:26? 00:00:08 /usr/sbin/httpd -D SSL

I think they're apache child processes listening on your http port, waiting for requests

py9jmas

6:22 pm on May 26, 2004 (gmt 0)

10+ Year Member



Apache on Unix/Linux uses a pre-forking model. It keeps a number of httpd process (by default 5, plus the master httpd process) around ready to answer queries. By keeping spare processes running it speeds up response time. Otherwise, for each incoming request the server would have to go through the overhead of starting a new process to reply to the client.

If you want to change the number of spare processes etc, look for StartServers, MinSpareServers, MaxSpareServers, MaxClients and MaxRequestsPerChild in httpd.conf

dend

10:46 am on May 28, 2004 (gmt 0)

10+ Year Member



Thanks for all.

I want to ask here maybe someone has really good optimizes http.conf for cPanel servers?

We are running about 1100 domains on server and had huge load - about 5.

Then I made some changes in config, set KeepAlive timeout to 2 - and here load came to 1.5 - 2.0!

So maybe someone has good httpd.conf with optimized values of other options like MaxRequestsPerChild and so on.

Leosghost

10:52 am on May 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We are running about 1100 domains on server and had huge load - about 5.

That is an awfull lot of domains on one server ...it must get pretty slow for some of them!

[edited by: jdMorgan at 3:17 pm (utc) on May 28, 2004]
[edit reason] Fixed formatting problem [/edit]

dend

4:51 pm on Jun 2, 2004 (gmt 0)

10+ Year Member



so the load was <5 because of not optimized configs. now the load is 1.5-2.0 and it is really nice speed and performance!

Optimization is a god. While you were purchased new server - we optimize configs and can add more domains and get savings.