Web Hosting Talk







View Full Version : cpu overwhelmed, system stops responding


Christopher
01-05-2002, 04:01 PM
Trying to figure out what is eating up my cpu. A month ago it was occasional stalls, then daily, now it won't stay up for more than a few hours.

Is it normal for

\_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf

to be running so many times simultaneously?

Chris


[root /]# ps -auxfw
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.3 0.0 1120 116 ? S 10:24 0:05 init
root 2 0.0 0.0 0 0 ? SW 10:24 0:00 [kflushd]
root 3 0.0 0.0 0 0 ? SW 10:24 0:00 [kupdate]
root 4 0.0 0.0 0 0 ? SW 10:24 0:00 [kpiod]
root 5 0.1 0.0 0 0 ? SW 10:24 0:03 [kswapd]
root 6 0.0 0.0 0 0 ? SW< 10:25 0:00 [mdrecoveryd]
root 310 0.1 0.1 1172 528 ? S 10:33 0:02 syslogd -m 0
root 319 0.0 0.1 1472 768 ? S 10:33 0:00 klogd
root 361 0.0 0.1 1328 624 ? S 10:34 0:00 crond
root 373 0.0 0.0 1136 484 ? S 10:34 0:00 inetd
root 378 0.0 0.1 2096 936 ? S 10:34 0:00 sshd
root 1033 0.0 0.3 2972 1600 ? S 10:39 0:00 \_ sshd
admin 1041 0.0 0.1 1708 948 pts/0 S 10:39 0:00 \_ -bash
root 1187 0.0 0.1 2088 940 pts/0 S 10:40 0:00 \_ su -
root 1189 0.0 0.1 1736 972 pts/0 S 10:40 0:00 \_ -sh
root 2037 0.0 0.1 2548 852 pts/0 R 10:53 0:00 \_
ps -auxfw
root 388 0.1 1.0 7308 5644 ? S 10:34 0:01 /usr/sbin/httpd.adm
srv -f /etc/admserv/conf/httpd.conf
root 410 0.0 1.1 7392 5712 ? S 10:34 0:00 \_ /usr/sbin/httpd
.admsrv -f /etc/admserv/conf/httpd.conf
root 411 0.1 1.4 10900 7240 ? S 10:34 0:01 /usr/sbin/httpd -f
/etc/httpd/conf/httpd.conf
httpd 467 0.7 1.5 11264 8016 ? S 10:34 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 468 0.8 1.5 11212 7860 ? S 10:34 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 469 0.7 1.5 11196 7920 ? R 10:34 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 470 0.8 1.5 11244 8016 ? S 10:34 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 471 0.8 1.5 11192 7884 ? S 10:34 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 482 0.7 1.5 11180 7824 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 493 0.7 1.4 11148 7692 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 494 0.7 1.4 11076 7616 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 528 0.7 1.4 11096 7652 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 529 0.7 1.5 11176 7984 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 530 0.7 1.4 11080 7620 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 531 0.7 1.4 11080 7644 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 618 0.6 1.4 11148 7688 ? R 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 619 0.7 1.5 11240 7976 ? R 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 620 0.6 1.5 11288 7992 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 621 0.7 1.5 11152 7848 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 622 0.6 1.5 11500 8252 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 623 0.6 1.5 11164 7884 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 624 0.7 1.4 11164 7708 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 625 0.8 1.4 11116 7716 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 631 0.7 1.5 11228 7976 ? R 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 632 0.7 1.4 11164 7744 ? R 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 633 0.7 1.4 11152 7700 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 634 0.8 1.5 11164 7768 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 635 0.8 1.5 11212 7864 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 636 0.7 1.5 11248 7972 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 637 0.8 1.5 11180 7900 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 638 0.6 1.5 11280 7988 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 639 0.7 1.4 11080 7668 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 640 0.8 1.5 11388 8056 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 641 0.8 1.4 11100 7640 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 642 0.8 1.5 11216 7860 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 650 0.6 1.4 11148 7688 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 651 0.7 1.5 11196 7980 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 652 0.7 1.5 11324 8096 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 653 0.7 1.5 11228 7956 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 663 0.7 1.5 11196 7868 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 664 0.7 1.5 11212 7884 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 665 0.8 1.5 11288 7988 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 666 0.8 1.5 11272 8048 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 667 0.7 1.5 11180 7916 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 668 0.7 1.4 11080 7620 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 669 0.7 1.5 11288 7992 ? S 10:35 0:08 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 670 0.8 1.4 11112 7680 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 672 0.6 1.5 11196 7868 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 673 0.6 1.5 11180 7876 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 674 0.8 1.5 11284 8060 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 675 0.8 1.5 11236 7964 ? S 10:35 0:09 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 677 0.7 1.4 11100 7640 ? S 10:35 0:07 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1411 0.8 1.4 11100 7644 ? S 10:44 0:04 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1413 0.7 1.5 11292 8044 ? S 10:44 0:04 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1444 0.8 1.5 11304 8048 ? S 10:45 0:04 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1702 0.7 1.5 11216 7860 ? S 10:48 0:02 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1746 0.8 1.4 11148 7688 ? S 10:49 0:02 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1747 1.0 1.4 11076 7616 ? S 10:49 0:02 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1748 1.0 1.4 11076 7616 ? S 10:49 0:02 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1914 1.0 1.4 11148 7688 ? S 10:51 0:01 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1978 1.0 1.4 11076 7616 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1980 1.1 1.4 11076 7616 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1981 0.2 1.5 11232 7908 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1982 1.1 1.4 11076 7616 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1984 0.5 1.4 11076 7616 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 1985 0.9 1.4 11076 7616 ? S 10:52 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
httpd 2036 9.0 1.4 11076 7616 ? S 10:53 0:00 \_ /usr/sbin/httpd
-f /etc/httpd/conf/httpd.conf
root 440 0.0 0.2 2592 1308 ? S 10:34 0:00 sendmail: accepting
connections
root 2034 0.0 0.2 2616 1352 ? S 10:53 0:00 \_ sendmail: start
up with [66.111.230.6]
postgres 477 0.0 0.2 4644 1336 ? SN 10:35 0:00 /usr/bin/postmaster

root 495 0.0 0.1 1672 832 ? S 10:35 0:00 sh /usr/bin/safe_my
sqld --datadir=/var/lib/mysql --pid-file=/var/lib/
mysql 612 0.0 0.4 20016 2108 ? S 10:35 0:00 \_ /usr/sbin/mysql
d --basedir=/ --datadir=/var/lib/mysql --user=mysq
mysql 644 0.0 0.4 20016 2108 ? S 10:35 0:00 \_ /usr/sbin/m
ysqld --basedir=/ --datadir=/var/lib/mysql --user=
mysql 645 0.0 0.4 20016 2108 ? S 10:35 0:00 \_ /usr/sb
in/mysqld --basedir=/ --datadir=/var/lib/mysql --u
root 701 0.0 0.0 296 128 ? S 10:35 0:00 /sbin/lcdsleep
root 776 0.0 0.0 1136 464 ? S 10:35 0:00 /sbin/getty ttyS0 1
15200
[root /]#


This was taken about 10 minutes after rebooting if that affects anything...

ffeingol
01-05-2002, 04:19 PM
You much have a very popular site on your box :D

It's not unusual to see multiple httpd processes. Depending on your config, 5 or 10 of them will be out there when you start apache. That's how Apache handles multiple requests. You control how many of them can be running at once within the httpd.conf.

As users go away, those "children" process will die and go away.

Frank

cbaker17
01-05-2002, 04:25 PM
yea you shouldnt have that many running though, i belive you can go into httpd.conf and specify the max sessions.

Christopher
01-05-2002, 06:25 PM
Thank you for your help with this...

What is a 'reasonable' number to set the maximum number of sessions to on a raq4i? I will give that a try and see if the server stablizes.

Is this the same as 'maxclients'? Currently mine is set at 300 (by default, I have not adjusted it).

Thanks again,

Chris