[Mongrel] running multiple mongrels from same application root - is it safe?

Zed Shaw zedshaw at zedshaw.com
Fri Aug 25 19:26:15 EDT 2006


On Fri, 2006-08-25 at 14:43 -0500, linux user wrote:
> Hi All
>  
> I was wondering if I run  multiple mongrels from same application root
> (one physical path) on the same machine is it safe as far as logging
> is concerned.
>  
> I mean won't there be race conditions or file locks and out of
> sequence logging statements?

After seeing you struggle with this, I suggest you use the built-in
Rails logging facility instead of p, puts, and print.  In any of your
actions you just do:

logger.debug("stuff")

And it shows up in the development.log or production.log.

The mongrel.log is really only for major catastrophe and reporting bugs
to me.

Otherwise, yes they'll be reasonably maintained but no promises.


-- 
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.



More information about the Mongrel-users mailing list