我们正在使用带有cPanel + WHM 11的CentOS 5的VPS
昨天晚上我们开始注意到,httpd和偶尔的mysql一直在500%的CPU使用率上一直达到峰值,以至于我们的主机因此而一直在暂停我们的账户。
我们有两个服务器小组研究它,但都不能确定这是为什么发生。
我们没有遇到任何stream量的涌入,没有什么重大改变代码明智的。
我们在apache错误日志中看到了很多这些
[Mon Nov 16 21:53:24 2009] [error] [client 65.55.207.22] Request exceeded the limit of 200 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
我在代码中找不到任何redirect循环,直到现在我们的.htaccessconfiguration没有引起任何问题:
DirectoryIndex home.html index.htm index.html index.php RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteCond %{HTTPS}s<>%1 ^(on(s)|offs)<>(.*) RewriteRule ^(.*) http%2://%3/$1 [L,R=permanent] RewriteRule ^c/([0-9]+)$ /main/?p=$1 [R=301,L] Addhandler application/x-httpd-php5 .html .inc AddHandler application/x-httpd-php5 .inc .html # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
我意识到这不是很多信息,如果没有挖掘,很难说,但如果有任何提高的迹象,或者如果你有什么build议,我们可以进一步研究。
首先,看看你的访问日志,看看它的请求。 这应该至less给你一个想法可能会导致redirect。
接下来,尝试使用Perl的lwp-request获取该URL:
lwp-request -esSd http://the/offending/url
这应该让你90%的方式来隔离问题的地方。