Sunday, January 14

Geek

Jessica Alba Ate My Server

I have 120 Apache threads running non-stop and bandwidth up 100% over normal, and who do I have to thank for it?

Idiots searching for pictures of Jessica Alba and Elisha Cuthbert and ending up at the Jawas.

But wait, there's more!

The Jawa Report is still running on Movable Type, but using an early version of Minx for comments. It seems that Rusty wanted the Minx comments to show up in the Movable Type generated pages - a reasonable enough desire, and one easily implemented with a PHP include_once statement pointing at the appropriate Minx page.

Suck it out of Minx, paste it into the HTML, let CSS do its wizardry to make the formatting work, and out it pops.

Only...

Problem 1: The early version of Minx that I set up for Rusty didn't cache individual posts, so that it was generating the pages from scratch every time. Which wouldn't really be a problem - Minx is pretty quick in any case - except for -

Problem 2: The include_once statement was placed where the old comment code had been in the template. Inside the loop. So if there were ten comments, the include_once would appear ten times. A minor defect, you'd think, and you'd be right if it weren't for -

Problem 3: PHP provides the include_once statement for the case where program A needs programs B and C, and programs B and C both need program D. include_once prevents you from getting two copies of program D. But that's just the end result; in the process of doing this it actually opens the file containing program D twice. Then it throws away the second copy. So the page with ten comments fired off ten requests to Minx, one after the other, and then threw nine of them away. And that too would have been fine; it would just have taken 100ms instead of 10ms to deliver the result, except for -

Problem 4: One recent (and popular) post at the Jawa Report has 786 comments at last count.

The server didn't melt. Quite.

Posted by: Pixy Misa at 05:26 PM | Comments (8) | Add Comment | Trackbacks (Suck)
Post contains 357 words, total size 2 kb.

1 And problem 5: the Google link was to a monthly archive entry which contained every Jawa post for an entire month.

Posted by: Steven Den Beste at Sunday, January 14 2007 08:49 PM (+rSRq)

2 Why no, I don't repeat myself when I repeat myself.

Posted by: Steven Den Beste at Sunday, January 14 2007 09:59 PM (+rSRq)

3 Thank for the pics.

Posted by: TallDave at Monday, January 15 2007 01:38 AM (odS+4)

4 Great pics!  Me love Jessica Alba...and Elisha Cuthbert too.

Posted by: Shawn at Tuesday, January 16 2007 10:36 AM (0fskM)

5 So ... will you be hosting goatse.cx photos labeled "Jessica Alba"?


Posted by: kristopher at Wednesday, January 17 2007 12:38 PM (jcvPd)

6 No, I'm insufficiently evil.

Posted by: Pixy Misa at Wednesday, January 17 2007 10:43 PM (GaSFI)

7 Sorry bout that. I'm not quite technically proficient enough to know what to do with something like that.

But, at least, the image search show our beloved Jessica apparently loving to 'read Muhammed cartoons"......whatever that means ;-)

Posted by: Rusty at Thursday, January 18 2007 07:56 PM (JQjhA)

8 No worries Rusty.  It would have been fine, except for the flaw in PHP.

Posted by: Pixy Misa at Thursday, January 18 2007 08:50 PM (GaSFI)

Hide Comments | Add Comment

Post is locked.
40kb generated in CPU 0.02, elapsed 0.023 seconds.
51 queries taking 0.0106 seconds, 225 records returned.
Powered by Minx 1.1.6c-pink.