I am always looking for ways to speed up my blog. I saw that Movable Type now supports FastCGI so I thought I would give that a try.
I downloaded FastCGI and compiled it for my BSD-based server. Had some trouble with the build because of include directories but I figured that one out. So FastCGI was up and running. I tried the simple HelloWorld.fcgi program on the link above but it didn’t work at all. The script was fine in “normal” CGI but not under FastCGI. Oh well, let me try hitting some MT pages. They worked! Ok, great. Maybe things are working anyway.
So I started messing around, but I would often get back errors from my web server. When I went into the Apache error logs, the last few lines would look like:
[Sun Apr 15 21:06:45 2007] [error] [client 220.127.116.11] FastCGI: comm with server "/usr/local/www/vhosts/brandon.fuller.name/mt/mt. fcgi" aborted: idle timeout (30 sec) [Sun Apr 15 21:06:45 2007] [error] [client 18.104.22.168] FastCGI: incomplete headers (0 bytes) received from server "/usr/local/www/ vhosts/brandon.fuller.name/mt/mt.fcgi"
It seems like the script aborted because it was idle? But then it didn’t complete the request that came in? Maybe this is something in the FastCGI config I don’t have right? Did some reading and found out the default request limit is 30 seconds. So I raised that up to 120 seconds and my rebuilds work fine now.
FastCgiServer /usr/local/www/vhosts/brandon.fuller.name/mt/mt.fcgi -idle-timeout 120
The pages do seem faster. I will keep experimenting.
UPDATE: I turned this crap off after 2 days. It sucks. Its unreliable and slow.