免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3109 | 回复: 5
打印 上一主题 下一主题

[Web] 求助:apache出现资源耗尽,导致宕机 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-17 10:57 |只看该作者 |倒序浏览
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

[ 本帖最后由 yu10101 于 2007-12-17 13:43 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-12-17 11:18 |只看该作者

回复 #1 yu10101 的帖子

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出现上述内容,觉得非常不正常

论坛徽章:
0
3 [报告]
发表于 2007-12-17 20:22 |只看该作者
同问一下,我也遇过这个问题。
top里看,我是swap用的相对多一些,所以出现这个情况。

论坛徽章:
0
4 [报告]
发表于 2007-12-17 22:06 |只看该作者
有人用syn攻击你了?

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

[ 本帖最后由 evil_knight 于 2007-12-17 22:07 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2007-12-18 11:48 |只看该作者
找到原因了,是因为一个网站的的代码有问题,谢谢大家

论坛徽章:
0
6 [报告]
发表于 2007-12-18 13:17 |只看该作者
兄弟 你管理的是百度的服务器
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP