[Mongrel] mongrel becoming unresponsive
Pete DeLaurentis
pete at nextengine.com
Tue May 8 11:21:36 EDT 2007
Thanks for the explanation Luis. This makes good sense. It seems
like Mongrel is intercepting the stdout + sterr (puts it all into
mongrel.log), but it's not good to work with something that isn't
threadsafe.
Makes me wonder if the rails logs are safe if you write to them from
different mongrels in a cluster. Any experience with this?
Thanks,
Pete
> Pete,
>
> puts or anything that prints to stdout/stderr interfere with CGI
> (Servlet dispatcher used by Rails).
>
> Also, puts not being threadsafe (you cannot garantee "this line #1"
> will get print fully form one thread and other text line from another
> will without interfere eachother).
>
>
> use RAILS_DEFAULT_LOGGER (or just 'logger' in your controllers, views
> or models).
>
> logger.debug (for debug level) is very helpful during development.
>
>
> --
> Luis Lavena
> Multimedia systems
> -
> Leaders are made, they are not born. They are made by hard effort,
> which is the price which all of us must pay to achieve any goal that
> is worthwhile.
> Vince Lombardi
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
More information about the Mongrel-users
mailing list