The crawlers are eating your server
Down every weekday a few minutes after the morning's articles went out. A wall of scrapers meeting a freshly emptied cache. What we blocked and what we changed.
A publisher’s site started falling over at the same time every weekday: a few minutes after the morning’s articles went out. The error pages were the generic kind, the server was not out of memory, and the traffic graphs showed nothing a reader would recognise as a spike. What they showed was a wall of bots, and a cache that had just been emptied.
Two things happening at once
The first was the crawlers. Not Google, which is polite and rate-limited, but the new generation of scrapers feeding AI models, plus the usual SEO tools and a few that identify themselves as browsers. Together they were requesting pages faster than real readers by a wide margin, at every hour of the day, with no regard for the cache.
The second was the page cache being wiped on every publish. The plugin was configured to clear the whole cache whenever a post was published or updated, which on a busy news morning meant every few minutes. Each wipe turned the next few thousand requests, mostly bots, into full page builds against the database. The PHP workers filled up, real readers queued behind the crawlers, and the site timed out until the cache refilled.
Finding which bots mattered
The access log, grouped by user agent, told us which crawlers were responsible for most of the load. A handful of agents accounted for the majority of requests, and none of them brought a reader, a subscriber or an advertiser impression. The publisher had no commercial relationship with any of them.
What we changed
- Known AI and scraper agents are refused at the web server. They get a forbidden response, or for the worst offenders the connection is simply closed, before PHP is involved. Google, Bing and the agents the publisher actually benefits from are untouched.
- The cache is no longer wiped on publish. Publishing a post now clears the home page, the relevant category pages and the post itself. The rest of the site stays cached. The plugin supported this; nobody had changed the default.
- Cache files are served by the web server directly, without touching PHP at all, so a cached page costs almost nothing however many bots request it.
- Worker saturation is now monitored. The site answered health checks throughout the outages, because a health check is one cheap request. The number of busy PHP workers is the metric that predicted every one of them.
Should you block AI crawlers?
That is a business decision, and the answer differs by publisher. Some want their content in AI answers and accept the crawl load. Some want to be paid for it. What is not a decision is letting an unidentified crawler take the site down for the readers who are paying for it. The robots file is a request. A refusal at the web server is a rule, and crawlers that ignore the first tend to respect the second.
The useful middle ground is to allow the crawlers that identify themselves honestly and publish a crawl policy, rate limit everything else, and refuse the ones that have never sent a reader.
The general point
A content site’s performance is mostly a cache question, and cache questions are mostly about what empties it and who is allowed to fill it. Every site we host has the crawler rules and the selective purge in place from the start, because the alternative is a site that goes down precisely when the news breaks.
Got a similar problem? Talk to us.
Start a project