Processess are not kill

saeed

Verified User
Joined
Oct 7, 2003
Messages
28
Location
Riyadh
Processess are not killed

Hi there,
I have a RedHat 9 in my machine. I am using directadmin control panel. I experiencing a strange problem with the processess listing by the TOP command. I have only one domain in that machine; whenever i type the url for this domain and open any forum thread and make refresh for several times and keep trying to refresh for some time. I can see the increasing processes by TOP command (in the top 20 processess there are nothing strange; but internally it creates too much processess and don't kill at all). When reaching 1300 processess (upon which 6 or 7 are running and the rest of are sleeping) apache goes down also server has very much high load.

Top Command Info:-
================
559 processes: 555 sleeping, 4 running, 0 zombie, 0 stopped
CPU states: 2.5% user 0.7% system 0.0% nice 0.0% iowait 96.6% idle
Mem: 1030668k av, 693164k used, 337504k free, 0k shrd, 108624k buff
495448k actv, 43820k in_d, 26868k in_c
Swap: 2096472k av, 0k used, 2096472k free 278860k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
2702 mysql 15 0 24664 24M 2036 S 99.9 2.3 0:02 0 mysqld
2574 root 15 0 12772 12M 9688 S 0.5 1.2 1:47 0 httpd
6 root 15 0 0 0 0 SW 0.1 0.0 0:11 0 kscand/Normal
2197 root 15 0 1180 1180 864 R 0.1 0.1 0:00 0 top
1 root 15 0 492 492 440 S 0.0 0.0 0:04 0 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 34 19 0 0 0 SWN 0.0 0.0 0:02 0 ksoftirqd_CPU0
8 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
4 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd
5 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kscand/DMA
7 root 15 0 0 0 0 SW 0.0 0.0 0:22 0 kscand/HighMem
9 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated
10 root 24 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd
14 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
72 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd
1839 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
1840 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
1841 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
2384 root 15 0 552 552 472 S 0.0 0.0 0:00 0 syslogd
2388 root 23 0 436 436 384 S 0.0 0.0 0:00 0 klogd
2406 rpc 15 0 616 616 532 S 0.0 0.0 0:00 0 portmap
2425 rpcuser 15 0 756 756 656 S 0.0 0.0 0:00 0 rpc.statd
2521 root 15 0 1460 1460 1224 S 0.0 0.1 0:00 0 sshd
2534 root 15 0 916 916 824 S 0.0 0.0 0:00 0 da-popb4smtp
2543 nobody 25 0 976 976 808 S 0.0 0.0 0:00 0 directadmin
2591 ftp 15 0 1120 1120 764 S 0.0 0.1 0:00 0 proftpd
2601 root 25 0 544 544 476 S 0.0 0.0 0:00 0 vm-pop3d
2620 root 15 0 572 572 500 S 0.0 0.0 0:00 0 crond
2635 root 25 0 1200 1200 1036 S 0.0 0.1 0:00 0 mysqld_safe

================


I really don't have any idea why not the processess are not kill automatically.

Please any webguru can help me in this regard.
 
Last edited:
Hello,

Does your forum use cgi scripts? If so, make sure you are using the latest 1.3.29 version of apache, as there was a bug in 1.3.28 which left many defunct processes.. not sure that that is your problem, but just something to check.

John
 
I have come to the problem

Hi there,
Well i have the latest version of apache 1.3.29. I have checked everything and come to know the problem but don't know the solution. The problem is with the MaxClient value in the httpd.conf file. When processess increase the set MaxClient value (150 is default) the apache should automatically restart. I have cpanel in other servers and have done a simple test; upon checking i come to know apache automatically is stopped when crossing the limit for MaxClients value and restart automatically. But in this case (directadmin) apache does not restart automatically which causes server to hang. Here is the log for the apache when it is hanged:-

[root@host6 /]# tail /var/log/httpd/error_log (which gives as under)
[Sat Nov 29 13:59:30 2003] [error] server reached MaxClients setting, consider raising the MaxClients setting

I have checked the status for apache (processes) after hang:-
[root@host6 httpd]# /etc/init.d/httpd status
httpd (pid 15013 15012 15011 15010 15009 15008 15007 15006 15005 15004 15003 15002 15001 15000 14999 14998 14997 14996 14995 14994 14993 14992 14991 14990 14989 14988 14987 14986 14970 14969 14968 14962 14960 14959 14958 14957 14956 14955 14954 14953 14950) is running...
[Here you can see apache is still running; where as it must be stopped or restart automatically]

I can increase the MaxClient figure but this will crash the system.
What i think and i know is that.. this must be done by your end. Direct admin software needs to monitor the MaxClients value; which needs a simple script to track the value and when it cross the limit stop or restart the apache. Our problem will be solved but this need a simple script by you people. [Just like cpanel software].

regards/Saeed
 
Last edited:
Can i ask if you have tried a reboot since this has occured? I have seen a similar problem (refreshing every second) with phpbb forums, the solution was simply a reboot and then a further restart of mysql.

Im sure someone here will get a script going to sort problems like that either way ;)

Chris
 
I know of one host who has created a cron job to restart apache every hour.. perhaps that would work for you?

John
 
Remember to use
Code:
/sbin/service httpd restart
instead of apachectl, or it'll kill apache and won't be able to boot it up :)

John
 
Back
Top