We are running a high traffic site in expression engine 2.10.1.This has a page-views of 150k daily.The server is load balanced and is running fine. Recently we have strange issue of some pages being requested concurrently for more than 50-100 times from an an ip in less than a second.This increases the database connections and database load which brings down the site.Is there anyway to prevent this or reduce the db load on such incidents


That could be a DDOs attack , there is a lot of that going around. I had a number of number of small tester attacks which spiked the server load. It was a lead up to a major attack which took down our site at a critical time for 12 hours. We have become Cloudflare customers since then and it has stopped a number of attacks for us over that the last year


Could be an intentional attack or a site scraper without limits which will usually bombard your site following all links it finds without pausing, causing a DOS attack. At a very basic level, you can block the IP in .htaccess, but they'll probably be back on a different IP, or if your site is on the radar, there could be attacks from multiple locations/people. Last time this occurred I simply blocked the IP, a duplicate of the website content soon appeared on a domain based out of China trying to get people to purchase from the site with scraped product data and imagery.

The best solution if your host can't provide the service is to rate limit in Apache (or NginX), to restrict multiple http requests from the same IP to a more normal and acceptable level.

Stack Overflow Answer

Another good walkthrough can be found here, various settings in the code will need to change depending on what you want to limit the requests to. Be careful the code example given is for version 1 of the security module not v2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.