[Nitro] Running multiple Nitro sites under Lighttpd/FCGI

Aleksi Niemela Aleksi.Niemela at cs.helsinki.fi
Tue Nov 22 09:42:12 EST 2005

Tim Howe wrote:

>	Well, it appears as though I have managed to externally spawn Spark as
>a fastcgi process and connect to it with lighttpd.  However, the ruby process,
>when "idle" is using about 30% of my servers cpu resources to apparently sit
>there and do nothing.
>It does the same thing if I just run it as WebRick.  What's it doing?
Just a though. Any chances you're still running Nitro in debug mode? 
That'd mean the processes go periodically check file system there are no 
changes in code to reload. In my Windows box under cygwin there's 
periodical load coming from one instance, and the load is much lighter 
under one-click-installed-ruby. However, disabling reloads probably 
affected the load. Can't recall for sure nor can I test it right now.  
In case you're running it in Debug mode, perhaps you'd like to say 
something like the following. May help. Or then again, may not help at 
all :).

   - Aleksi

  class Config
    attr_accessor :db, :webserver
    def initialize
      @db = {
        :address => "localhost",
        :destroy => false,
        :name => "...",
        :store => "psql",
        :user => "...",
        :password => "...",
        :connection_count => 1
      @webserver = {
        :BindAddress => "",
        :Port => 1234,
        :log_filename => "webrick.log",
        :log_level => 5,
  ### Here's the mode for the runner
        :mode => :debug,

    runner = Runner.new
    Runner.mode = config.webserver[:mode]
    runner.daemonize if runner.daemon 
    server = Server.new
    server.address = config.webserver[:BindAddress]
    server.port    = config.webserver[:Port]
    runner.invoke(server) unless $NITRO_NO_INVOKE

More information about the Nitro-general mailing list