求助:apache出现资源耗尽,导致宕机

求助:apache出现资源耗尽,导致宕机

redhat as 3 + php4

用了3年了,今天突然出现这样的情况,启动apache后,服务器马上资源被耗尽,几乎没有反应,关掉apache,之后系统就正常

error_log的日志
[Mon Dec 17 10:06:22 2007] [error] [client 202.108.23.56] (13)Permission denied: access to /~zbzxx/OTHER/JIAOSHI/cfol/source
/tools/Alarm Clock/sonar.wav denied, referer: http://202.108.23.172/index.html
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/1-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/4-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/2-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/3-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/6-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/5-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/7-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/8-1.gif, referer: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:23 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/de_files/top2.jpg, referer
: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:24 2007] [error] [client 124.134.37.248] File does not exist: /home/wenyuan/www/de_files/itembg.gif, refer
er: http://host.zdjw.gov.cn/~wenyuan/
[Mon Dec 17 10:06:26 2007] [warn] child process 1334 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1335 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1336 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1337 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1338 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1339 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1340 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1341 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1342 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1343 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1344 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1345 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1352 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1353 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1355 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1356 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1361 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1334 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1335 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1336 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1337 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1338 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1339 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1340 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1341 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1342 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1343 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1353 still did not exit, sending a SIGTERM
[Mon Dec 17 10:06:26 2007] [warn] child process 1361 still did not exit, sending a SIGTERM

PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
    7 root      20   0     0    0     0 SW   25.5  0.0   0:56   1 kswapd
    8 root      15   0     0    0     0 SW    6.6  0.0   0:13   1 kscand
1014 mysql     16   0 10436 1196   108 D     2.9  0.0   0:02   1 mysqld
1433 nobody    16   0     0    0     0 Z     2.3  0.0   0:01   1 httpd <defunct>
1443 nobody    16   0  130M 128M 16704 D     2.1  6.3   0:01   0 httpd
1447 nobody    16   0  127M 125M 15140 D     2.1  6.2   0:00   1 httpd
1440 nobody    16   0  130M 128M 16732 D     2.0  6.4   0:00   1 httpd
1417 nobody    16   0  167M  18M     4 D     1.9  0.9   0:01   1 httpd
1416 nobody    16   0  167M  18M     4 D     1.8  0.9   0:01   0 httpd
1422 nobody    15   0  167M  18M     4 D     1.8  0.9   0:01   1 httpd
1434 nobody    16   0  130M 128M 16812 D     1.8  6.4   0:00   0 httpd
1418 nobody    16   0  167M  19M     4 D     1.6  0.9   0:01   0 httpd
1428 nobody    16   0  168M  18M     4 D     1.6  0.9   0:01   0 httpd
1442 nobody    15   0  130M 128M 16764 D     1.6  6.4   0:00   1 httpd
1420 nobody    15   0  169M  21M     4 D     1.5  1.0   0:01   1 httpd
1425 nobody    15   0  167M  20M     8 D     1.5  1.0   0:01   1 httpd
1444 nobody    15   0  130M 128M 16704 D     1.5  6.3   0:00   0 httpd
1445 nobody    15   0  115M 114M  9328 D     1.5  5.6   0:00   0 httpd
1391 root      16   0   560  524   308 R     1.4  0.0   0:03   0 top
1419 nobody    15   0  168M  16M     4 D     1.4  0.8   0:01   1 httpd
1421 nobody    16   0  172M  22M     4 D     1.4  1.1   0:01   1 httpd
1424 nobody    16   0  167M  20M     4 D     1.4  1.0   0:01   1 httpd
1438 nobody    15   0  130M 129M 16856 D     1.4  6.4   0:00   1 httpd

top出现上述内容,觉得非常不正常
同问一下,我也遇过这个问题。
top里看,我是swap用的相对多一些,所以出现这个情况。
有人用syn攻击你了?

你吧你的apache的maxclient减小,不要这样不给自己留余地嘛,这么干是愚蠢的表现!

找到原因了,是因为一个网站的的代码有问题,谢谢大家
兄弟 你管理的是百度的服务器