Aquarionics

Thursday 1st May 2003

Not Cool

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?

Those who spoke on this:

gravatar image

Pol:

2003-05-01 16:35 56 mins after the Original Article

Lotsa Fun – hopefully fixed now.

/me goes to write mod_DoS_high_page_rate_servers

Comment Link

gravatar image

pol:

2003-05-02 10:36 18 hrs after Pol

Test followup

Comment Link

gravatar image

MP:

2003-05-01 17:49 2 hrs after the Original Article

Did anyone work out whether it was my programs that caused the problems?
It certainly wasn’t my stuff doing anything this morning, unless PHP can run all night on its own, but I was trying to access my pages using PHP this afternoon…

Comment Link


Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


More Journal:

[RSS Icon]
[ESF Icon]
[CDF Icon]

That which is relevant:


Explain Ads
© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.525 seconds, 22 queries, 2.66Mb on Mon, 28 Jul 2008 18:41:07 +0000
Generated by Epistula Version 2.0.3