Dark Light

So, Aquarionics has been yo-yo-ing all afternoon, because some tin-pot server over in America decided it wanted to spider my site at a couple of hundred pages a minute.

Now, each of these articles on a page is made out of a few DB accesses. When you build a page, you have four DB queries per article, for the attachments, two for the crossreferences (logs and the xref table) and one for the comments. Plus one query that gets all the relivant items for display on the page. This is why the category archives, which can have up to five hundred items on a page, don’t show comments, attachments or crossreferences. Not that a query is much overhead, thanks to the wonder that is persistant connections.

Epistula’s Funky Caching (Originally billed as ‘Vinette style caching’) means that once a page has been built it’s saved and served as static content until the content changes, or the Admin deletes the cache. Last night I modified the page class that generates the HTML code, and so cleared the cache (This was for the referer stuff).

This afternoon, said tinpot server (Which actually belongs to AltaVista and therefore really should know better) grabbed 4000 pages in about half an hour. This had something of a knock on effect on performance because Sneaky was querying the database for [E]2 (And I had somehow disabled persistant connections at this point, so 5 connections per entry), as well as once per file downloaded (complete with all user information) to the apachelog database set up earlier this week

At this point, pol took down the webserver to find out what was wrong and install throttling stuff, but still, at a decent rate of hits (which Aqcom – which is the default virtualhost for the server – gets) the mod_sql_log was DoSing the box, as Apache wouldn’t serve what it couldn’t log. How the current level is killing it where yesterday’s wasn’t, I’m not quite sure. So pol has installed the ionCube Accelerator for PHP, and taken off the sql_logs for the time being.

Isn’t life fun?

Related Posts