Making Movable Type Scream

A recent thread on the ProNet mailing list about ways to reduce the overhead associated with high comment and TrackBack loads inspired me to do something I have been meaning to do for a while: install Fast CGI. Fast CGI is a framework for hosting perl applications on the web. It dramatically increases the speed at which these applications load and are processed. The net result for my visitors and users of Movable Type is better application performance, faster commenting, and in almost all cases, fast page loading.

What was wonderful was how incredibly easy it was to setup. Keep reading to learn how I made Movable Type much faster on my Linux box running Apache.

Now I am (on the average) much more technical than the average user, but I found Neil’s article Running Movable Type on OS X with FastCGI to be incredibly helpful. The article’s title is misleading though - this is not Mac OS X specific. This applies just as easily to any Linux or *nix based system.

I made very few mistakes along the way, and the ones I did make were the result of me not reading the instructions. You see the high opinion I have of myself in regards to these types of things often causes me to skim, or not fully focus on the instructions I am reading. But I have found that with instructions as carefully crafted as Neil’s that if you just slow down and read, they work 99% of the time just as they are written.

Anyway, I couldn’t be more pleased with the results. It is nice when a backend change like this actually makes a perceptible difference. And now Movable Type screams!

5 Comments

Here's a follow up. I did a little benchmark using FasterFox as my timer. The MT app is twice as fast. But sadly I am actually having difficulty getting mt-comments.fcgi to work. So I disabled that for the time being. Ug.

Funny, I got mt-comments.fcgi to work but I couldn't get search to work as it seemed to cache things. When other blog users on the same instalation would do a search it would bring back results for whatever blog did a search before them instead of just theirs.

Also when doing edits of authors I found I have to reboot the server to clear fcgi's cache. Dunno if you've experienced any of these problems yourself but I just thought i'd share :-)

I tried to use fcgi but I got these kind of errors:
/cgi-bin/.htaccess: FastCgiConfig not allowed here
cgi-bin/mt.fcgi" aborted: (first read) idle timeout (30 sec)
incomplete headers (0 bytes) received from server "/cgi-bin/dispatch.fcgi"
I,m really confused and finally I should give up.Can any body tell me exactly what to do, as if I'm a 4 years boy?!!

Hey Byrne - any chance you might be able to help us at TreeHugger out? I'm having a terrible time getting this darn FastCGI to work and our install is crawling. We'd be happy to compensate ya!

Eric - likely, your host either already has FastCgiConfig set to their liking or, just doesn't allow users to run this (I use Dreamhost and both apply).

The 'incomplete headers' means that the process timed out and was killed by the server before it ever had a chance of throwing out the headers. In my case, Dreamhost sets the kill rate at 300 (wicked aggressive) rather than the 3600 most instructions for MT prefer.

It could also be a memory issue - multiple instances of CGI programs running. If you have shell access, run top and see if you have more than one mt.cgi (or whatever other programs you would normally have running).

All that said, I am currently unable to get MT 3.34 running w/ FastCGI - too bad, considering the amount of traffic my sites are starting to generate. The comment spam alone drags down my mt.cgi.

Leave a comment

what will you say?


Recent Comments

  • Eric - likely, your host either already has FastCgiConfig set to their liking or, just doesn't allow users to run this (I use Dreamhost and both apply). The 'incomplete headers' means that the process timed out and was ...

  • Hey Byrne - any chance you might be able to help us at TreeHugger out? I'm having a terrible time getting this darn FastCGI to work and our install is crawling. We'd be happy to compensate ya! ...

  • I tried to use fcgi but I got these kind of errors: /cgi-bin/.htaccess: FastCgiConfig not allowed here cgi-bin/mt.fcgi" aborted: (first read) idle timeout (30 sec) incomplete headers (0 bytes) received from server "/cgi-...

  • Funny, I got mt-comments.fcgi to work but I couldn't get search to work as it seemed to cache things. When other blog users on the same instalation would do a search it would bring back results for whatever blog did a se...

  • Here's a follow up. I did a little benchmark using FasterFox as my timer. The MT app is twice as fast. But sadly I am actually having difficulty getting mt-comments.fcgi to work. So I disabled that for the time being. Ug...

Close