fastcgi berzerking
Before I go any further—yes, the stylesheet/design has slightly reverted and I am not done with the design. So, hold your kvetchin' til later.
She Can't Take Much More, Captain!
So, first to tackle the load issue. With the help of the wonderful folks in freenode's #rubyonrails IRC channel, I found that my two Typo installs were running in development instead of production. D'oh. Here's how you can fix that (in your httpd.conf—I'm assuming Apache, here):
Find your IfModule directive:
<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi .fcg .fpl .rb
</IfModule>
Add the following:
FastCgiConfig -idle-timeout 300 -initial-env RAILS_ENV=production
This adds an idle time-out, which is not a default setting, and sets the RAILS_ENV as you can see. Most Rails apps default to development if you haven't set the RAILS_ENV elsewhere, and that results in much, much heavier load on the server.
Out of Date, Out of Mind
The other problem is that we were running version 0.8.5 of the FastCGI bindings, which are known to have a memory leak. Now, what I have yet to divine is whether the memory leak is confined to the rubygems version of 0.8.5, or all versions—we weren't running the gem, we were running the package from Debian's apt-get. But we upgraded anyway! And that, I thought for some time, is what broke things. (As you'll find out in the "next installment," I was incorrect. Sadly.)
If you are running the rubygems FastCGI bindings (called fcgi), then you should definitely uninstall it and install from either your operating system's package manager—if it has the up-to-date version—or from the source. Unfortunately, I don't have a link to the source on hand and Google is being remarkably recalcitrant, but you should be looking for the phrase "fcgi bindings" or "libfcgi," and make sure to get version 0.8.6.
Gem? Wha?
Don't know if you have fcgi installed as a gem? Open up ye olde trusty command-line interface and type:
gem list
If you see the following:
fcgi (0.8.5)
FastCGI ruby binding.
You'll know you have some cleanin' to do. You can just type sudo gem uninstall fcgi and be on your way (assuming you're not already root).












Glad to see you're back up and running. Woo hoo!
Just an FYI for anyone out there installing FCGI on a Debian system. For some reason, the source file (fcgi.rb) in the 0.8.6 package still contains a comment indicating that it is version 0.8.5. I have no idea if the comment is wrong and indeed this is the new version, or if the comment is correct and the wrong file made it into the package. Just a heads up.
Thanks for the write-up :)
The content of your show is great, I really enjoy it...
Thanks for taking the time to do it.
Thats correct.
The problem is my browser...
I thout to do it in my local version :(
Thanks :(
Thanks for taking the time to do it :(
Well done, nice instructions...
I'm working :)
Good idea :)
Thanks for the write-up.
Very nice write up.
I use Firefox in Ubuntu.
I thout to do it in my local version.
Just thought I'd make a note about a problem :)
Thats correct.
Gonna have to give it a try!
I had and the fix I found...
I think it would be usefull for other users also :(
I was very dissapointed of this!
Thanks...
Thanks :)
Thanks. Updated appropriately...
I was very dissapointed of this!
I think it would be usefull for other users also :(
Good idea...
But I'm not sure why :)
I think it would be usefull for other users also...
I think it would be usefull for other users also :)
Very nice write up...
Good idea...
There is some strange behaviour with this!
The content of your show is great, I really enjoy it.
Just thought I'd make a note about a problem!
That's awesome :)
I think it would be usefull for other users also...
I was very dissapointed of this :(
There is some strange behaviour with this :)
Just thought I'd make a note about a problem :(
There is some strange behaviour with this...
I had and the fix I found...
The content of your show is great, I really enjoy it :)
Just thought I'd make a note about a problem!
Gonna have to give it a try.
Gonna have to give it a try :)
The problem is my browser :(
Just thought I'd make a note about a problem :)
But I'm not sure why.
Not really new :(