Posted by
stoyan on 05-Feb-2007
origin: gabito.com blog post
…I’ve finally gotten my 500 error rate down to 0 by making some minor changes to the signal handling code of dispatch.fcgi. If the dispatch.fcgi process is in the midst of handling a request I defer letting it be killed until the request is complete. I did this by installing a custom TERM signal handler that protects the dispatch.fcgi process while a request is being processed…
Posted by
stoyan on 25-Aug-2006
I put some notes for nginx on my wiki .
The rails system administration is like waves – somebody found a new software and the community just fulfill it. Maybe there must be some name for this effect. Something like digg-effect but maybe Rails wave hahaha.
First there was lighttpd , now nginx comming. Maybe your piece of code will be the next. Are your ready?
Posted by
stoyan on 20-Jun-2006
Great news from LiteSpeed Technologies – after a post to the forum they have “X-Forwarded-Proto: https” AUTOMATICALY added to the headers, when proxing requests, initially comming via HTTPS. Now Rails applications are not confused, when doing redirects for HTTPS. Good to be added to Litespeed+Mongrel docs .
The litespeed-2.1.17 is already available for download (even still there is no announce).
Posted by
stoyan on 30-May-2006
1. Install fossilize plugin
$ ./script/plugin source http://opensvn.csie.org/mmediasys/trunk/rails/plugins/
$ ./script/plugin install fossilize
2. Create the default script and configuration for your application
# will create config/application.yml and bin/my_rails_app
$ ./script/generate fossilize MyRailsApp
3. Edit config/application.yml if needed (author name, email, gem version etc.)
4. Generate the gem (in pkg/ directory)
# will produce pkg/my_rails_app-x.y.z.gem
$ rake package
5. Usage
$ gem install my_rails_app
$ my_rails_app /path/to/install
Posted by
stoyan on 28-Mar-2006
Must read articles for everybody, doing RoR systems administration:
03-Apr-2006 Update:
Posted by
stoyan on 27-Jan-2006
A relatively unknown webserver from LiteSpeed Technologies claims to be six times faster than Apache with a PHP interface that is 50% faster than mod_php…Litespeed webserver is available in 3 editions, the standard edition being free (for both personal and commercial use).
And it can launch RoR applications .
Maybe not so hot news, because we already have quick fastcgi capable web server like lighttpd . Still some alternative is good.
Posted by
stoyan on 24-Nov-2005
From the Lighttpd blog
:
lighttpd 1.4.8 was just released and next to a pile of bugfixes we added a new option to fastcgi.server to allow a simple setup of multiple rails app in one virtual host…the new option strip-request-uri removes parts of the request-uri before they are sent to the backend:
$HTTP["url"] =~ "^/app1/" {
server.document-root = "/home/rails/app1/public/"
alias.url = ( "/app1/" => "/home/rails/app1/public/" )
server.error-handler-404 = "/app1/dispatch.fcgi"
fastcgi.server = ( "/app1/dispatch.fcgi" =>
(( "socket" => "/tmp/app1.socket1",
"bin-path" => "/home/rails/app1/public/dispatch.fcgi",
"strip-request-uri" => "/app1/"
)))
}
Maybe you can have the same effect with adding to config/environment.rb the line:
ActionController::AbstractRequest.relative_url_root = "/app1"
In case of lighttpd, runing on high port, behign an apache proxy (similar to TextDrive), just add to apache.conf:
ProxyPass /app1 http://app1.example.net:8080
ProxyPassReverse /app1 http://app1.example.net:8080
Posted by
stoyan on 23-Nov-2005