[TYPO3-english] apache bench mark tool over flooded typo3 site
J. Bakshi
joydeep at infoservices.in
Tue Jan 12 09:08:50 CET 2010
Hello list,
Today I was testing my apache server with "ab" command aka apache
benchmarking tool. I have found though it is a useful tool to check
apache performance ; specially if you install eAccelerator ; but in a
wrong hand it is very dangerous. It creates a huge page call and bottle
neck the target apache. During the check typo3 reports "database
connection error" !!!. I have used
` ` `
ab -n 1000 -c 20 http://<site-name>/index.php?no_cache=1
` ` `
I have applied two possible solution which prevents the ab successfully
1] at .htaccess
` ` `
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^ApacheBench [OR]
RewriteCond %{HTTP_USER_AGENT} .. other agent # other agets you want to
block
RewriteRule ^.* - [F,L]
2] Directly in apache through httpd.conf
SetEnvIfNoCase user-agent "ApacheBench" bad_bot
<FilesMatch "(.*)">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</FilesMatch>
Please inform if there is any other/better technique.
Thanks
--
জয়দীপ বক্সী
More information about the TYPO3-english
mailing list