今天下班回到宿舍,就发现apache访问很慢,即使是用本地地址192.168.0.160访问也是一样,这个就排除了是网络的原因了,搜了一番也没找到什么原因。
然后就查看LOG
然后就查看LOG
tail -f /var/log/apache2/error_log
发现里面都是相同的内容:
[Tue Feb 10 22:52:51 2009] [notice] child pid 7887 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7888 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7889 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7890 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7891 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7892 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7893 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:51 2009] [notice] child pid 7894 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:52 2009] [notice] child pid 7895 exit signal Segmentation fault (11)
[Tue Feb 10 22:52:52 2009] [notice] child pid 7896 exit signal Segmentation fault (11)
然后再搜,隐约中搜到好像是应该访问了某个不应该访问的文件造成的。
然后再分析了正常LOG,发现几个IP不停的访问几个文件
gentoo-pjq pjq # tail -f /var/log/apache2/access_log
\xad\x97\xe5\xb9\x95.rmvb HTTP/1.1" 404 306
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/%CB%C0%CD%F6%D3%CE%CF%B7%D6%D0%CE%C4%D7%D6%C4%BB.rmvb HTTP/1.1" 404 298
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/\xcb\xc0\xcd\xf6\xd3\xce\xcf\xb7\xd6\xd0\xce\xc4\xd7\xd6\xc4\xbb.rmvb HTTP/1.1" 404 298
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/%E6%AD%BB%E4%BA%A1%E6%B8%B8%E6%88%8F%E4%B8%AD%E6%96%87%E5%AD%97%E5%B9%95.rmvb HTTP/1.1" 404 306
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/\xe6\xad\xbb\xe4\xba\xa1\xe6\xb8\xb8\xe6\x88\x8f\xe4\xb8\xad\xe6\x96\x87\xe5\xad\x97\xe5\xb9\x95.rmvb HTTP/1.1" 404 306
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/%CB%C0%CD%F6%D3%CE%CF%B7%D6%D0%CE%C4%D7%D6%C4%BB.rmvb HTTP/1.1" 404 298
222.68.163.171 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/\xcb\xc0\xcd\xf6\xd3\xce\xcf\xb7\xd6\xd0\xce\xc4\xd7\xd6\xc4\xbb.rmvb HTTP/1.1" 404 298
117.82.54.65 - - [10/Feb/2009:23:17:01 +0800] "GET /ftp/music/%E7%B2%BE%E6%AD%A6%E9%97%A8.rm HTTP/1.1" 404 289
117.82.54.65 - - [10/Feb/2009:23:17:07 +0800] "GET /ftp/music/\xe7\xb2\xbe\xe6\xad\xa6\xe9\x97\xa8.rm HTTP/1.1" 404 289
117.82.54.65 - - [10/Feb/2009:23:17:11 +0800] "GET /ftp/music/%BE%AB%CE%E4%C3%C5.rm HTTP/1.1" 404 286
117.82.54.65 - - [10/Feb/2009:23:17:17 +0800] "GET /ftp/music/\xbe\xab\xce\xe4\xc3\xc5.rm HTTP/1.1" 404 286
心想会不会是这几个文件造成的。
然后我将对应目录下的这几个文件移走,发现就一切正常了。真是很奇怪,也不知道这几个文件有什么特殊的地方。
害得我将apache重新装了好几次,还将phpBB重新编译了。
apache反应很慢原因分析