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

1 Comment

I have less than a year now to give up smoking, I promised the kids I'd give up before I turn 50. The count-down has begun.

Leave a comment

Twitter Updates

Subscribe

Enter your Email


Preview | Powered by FeedBlitz

Archives

Powered by Movable Type 4.21-en

Random Pix

Random Quote

If I Knew

If I knew it would be the last time

That I'd see you fall asleep,

I would tuck you in more tightly

and pray the Lord, your soul to keep.


If I knew it would be the last time

that I see you walk out the door,

I would give you a hug and kiss

and call you back for one more.


If I knew it would be the last time

I'd hear your voice lifted up in praise,

I would video tape each action and word,

so I could play them back day after day.


If I knew it would be the last time,

I could spare an extra minute

to stop and say "I love you,"

instead of assuming you would KNOW I do.


If I knew it would be the last time

I would be there to share your day,

Well I'm sure you'll have so many more,

so I can let just this one slip away.


For surely there's always tomorrow

to make up for an oversight,

and we always get a second chance

to make everything just right.


There will always be another day

to say "I love you,"

And certainly there's another chance

to say our "Anything I can do?"


But just in case I might be wrong,

and today is all I get,

I'd like to say how much I love you

and I hope you never forget.


Tomorrow is not promised to anyone,

young or old alike,

And today may be the last chance

you get to hold your loved one tight.


So if you're waiting for tomorrow,

why not do it today?

For if tomorrow never comes,

you'll surely regret the day,


That you didn't take that extra time

for a smile, a hug, or a kiss

and you were too busy to grant someone,

what turned out to be their one last wish.


So hold your loved ones close today,

and whisper in their ear,

Tell them how much you love them

and that you'll always hold them dear


Take time to say "I'm sorry,"

"Please forgive me," "Thank you," or "It's okay."

And if tomorrow never comes,

you'll have no regrets about today.


:: In memory of September 11

Recent Comments