Running Movable Type Under FastCGI on DreamHost

| 1 Comment | No TrackBacks |

It's taken me the better part of 24 hours, but I've finally got this site back to working how I want it to. Comments are working, though trackbacks are turned off for everything but internal links. MT is now running under FastCGI and I'm hoping to see huge improvements. According to SixApart, these are the advantages:

Movable Type is a large application with a lot of files. In a CGI context that application is loaded into memory every single time, and there is no ability to leverage a cache across a session or multiple requests.

When using mod_perl of FastCGI, the application is loaded into memory so that it doesn't have to be reparsed and interpreted every single request. This dramatically increases performance.

It also has the advantage of shielding users of more popular sites from spam attacks. Servers can easily become overwhelmed when the MT App is being loaded simultaneously by so many concurrent processes (presumably someone who is posting comment spam to 10 or 20 entries all at once). By keeping MT in memory posting comments happens a lot quicker so that your web server is not tied up as long...

I read a post from Jay Allen entitled DreamHost, Movable Type and FastCGI that kicked me off on a crusade to get the comments working again with better security and less chance of causing server overloads.

dhtop.gifI signed up for a two-year contract with DreamHost using a promo code that saved me half the cost. Lots of sites offer DreamHost promo codes. I spent most of the night then backing up my old site and transferring to the new one. (Again!) The DreamHost panel was nothing like the cPanels I've been used to, my PHP includes wouldn't work, and I was missing bits and pieces from the MT install, so for much of today I've been sorting the errors and reading the DreamHost discussions.

My first task was to upload MT 3.34, recommended for all Movable Type users which enables simple use of FastCGI that yields a 15x performance increase. Actually implementing FastCGI presented plenty of headaches. I updated the PHP to 5.1.2, and after doing that, I copied the following two lines of code into a .htaccess file in the MT directory and suddenly the site is super-fast and I'm super-impressed.

#AddHandler cgi-script .cgi
AddHandler fastcgi-script .cgi

It took me a while to realise I had to upgrade the PHP. That was the thing that was stopping FastCGI from working. After I did that, MT has been running like a bullet and I couldn't be happier.

So comments are now working!! My next challenge will be to use shell commands available on DreamHost. I've dabbled with a few Unix installs over the years and have a rudimentary knowledge of the Unix commands, but I need to read a good tutorial to get me started.

No TrackBacks

TrackBack URL: http://www.bestoday.com.au/cgi-bin/mt/mt-tb.cgi/719

Your going to love using the shell once you become comfortable with it. I worked on Unix/Linux for a few years before creating my own Linux host in University. A few years ago I could no longer spend the time to mess around with running my own host out of the basement, and travel often left me unable access my server. I started looking for professional hosting and shell access was a must. I got onto Dreamhost the same way it seems that you did, I found a promo code.

Thanks for the link.

I enjoyed the "Engrish" gallery, much of the business travel that prevented me from hosting on my own was spent over in Japan .

Leave a comment

Twitter Updates

Subscribe

Enter your Email


Preview | Powered by FeedBlitz

Archives

Powered by Movable Type 4.23-en

Random Pix



A proud Nanna Toni holding Zeke with Lauren looking on

A proud Nanna Toni holding Zeke with Lauren looking on

Random Quote

Marion Woodman

"Without an understanding of myth or religion, without an understanding of the relationship between destruction and creation, death and rebirth, the individual suffers the mysteries of life as meaningless mayhem alone."

:: Writer, international teacher and workshop leader

Recent Comments