January 17th, 2005

stream

Weekend Purchases

Saturday Cheryl and I braved possible snow and left for IKEA and Best Buy to cash in our christmas gift cards. (Don't worry zenspider, we didn't spend all of it, and we'll have to go back for more stuff, anyhow.) We ended up with two bookcases and a set of shelves from IKEA, a new turtle tank from PetSmart, Crimson Skies, a 12 month Xbox Live subscription, a painfully uncomfortable Xbox headset and an answering machine/cordless phone from Best Buy, and a suction cup thermometer and 25' garden hose from Lowe's.

Collapse )

I still need to get new shoes and new pillows for myself, and some more bookcases for the bedroom, and maybe another shelf unit for the under-stairs storage area.

stream

All Flickr Uploaders Suck

Uploading the pictures attached to my previous post resulted in multiple duplicates when using the iPhoto exporter, not to mention that it crapped out twice on batch uploads, and uploaded a completely different picture when sending a single photo.

The Flickr-built uploader sucks even worse, because it has not once uploaded a picture for me successfully. Best I can tell, it didn't even try, because my bandwidth quota never got used either.

Manual uploads are much less frustrating, I just submit, then wait for it to show up on my home page while flickr slowly, slowly loads.
stream

mod_fastcgi and Max Processes

So, I wrote up the following little ruby-fcgi script:

#!/usr/local/bin/ruby

FCGI_PURE_RUBY = false
require 'fcgi'

count = 0 

FCGI.each_cgi do |cgi|
  sleep 60 if count < 3 
  cgi.out { "hi: #{count}, #{Time.now}" } 
  count += 1 
end


Then, I configured the server with only one FCGI process, and hit it 7 times in a row, waiting for the first to finish before grabbing the next. Here's the results:

Mon Jan 17 16:23:07 PST 2005 500 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Mon Jan 17 16:23:37 PST 2005 500 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Mon Jan 17 16:24:07 PST 2005 500 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Mon Jan 17 16:24:37 PST 2005 500 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Mon Jan 17 16:25:07 PST 2005 500 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Mon Jan 17 16:25:37 PST 2005 200 hi: 5, Mon Jan 17 16:25:38 PST 2005
Mon Jan 17 16:25:37 PST 2005 200 hi: 6, Mon Jan 17 16:25:38 PST 2005


The <!DOCTYPE lines are Apache 500 pages from the script timing out after 30 seconds of not writing anything. As you can see, there's 5 500 errors, not three. When you hit the max process limit, your requests just queue up, sending your server into a death-spiral of doom.

Fortunately, though, so long as the requests are queued, they'll continue to be fulfilled by the FCGI processes.