[Mongrel] mongrel not daemonizing for me..
beingthexemplarylists at gmail.com
Fri Jun 29 01:51:34 EDT 2007
On 6/29/07, Eden Li <eden at mojiti.com> wrote:
> On 6/29/07, aaron smith <beingthexemplarylists at gmail.com> wrote:
> > config.run.join is actually what keeps it running. if I do a "ps x |
> > mongrel" the process shows up.. but if I don't run config.run.join it
> > doesn't keep running..
> Yeah, I guess I misunderstood how Daemon.daemonize works, sorry about
> > The problem still is that mongrel seems to be daemonizing correctly but
> > the application doesn't perform as expected, (not doing remoting
> > correctly).. A request comes in and no response is ever returned..
> > any ideas?
> I wrote a little test script that daemonizes DirHandler in the same
> way you're daemonizing RUBYAMF::MongrelServlet:
> #!/usr/bin/env ruby
> require 'rubygems'
> require 'mongrel'
> c = Mongrel::Configurator.new(:host => '127.0.0.1') do
> listener(:port => 8000) do
> uri("/", :handler => Mongrel::DirHandler.new('.'))
> c.daemonize(:cwd => Dir.pwd, :log_file => 'log')
> This daemonizes correctly, but the log file bloats quickly with messages
> !!!!!! UNHANDLED EXCEPTION! closed stream. TELL ZED HE'S A MORON.
> Going back to the docs for daemonize, I read:
> "You must call this before frameworks that open files as otherwise the
> files will be closed by this function."
> So I put the daemonize line into the config block right before the
> listener block (removing the ref to c, of course), and everything
> works as expected.
> Maybe try daemonizing before you initialize your RUBYAMF handler?
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
AHH. that's what it was. I even read that in the docs it just didn't click
in my head. Thanks much!!!!!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users