On 29 Oct 2008, at 15:29, Maurício Linhares wrote:

>
> A slow SQL query woudn't freeze rails 2.2 as it freezes 2.1 now as the
> MRI removes threads that are waiting for IO handles to be available
> from the running list, so this should not be a big issue with the new

It depends. C extensions can freeze the entire ruby interpreter, right  
now the native mysql driver is one of those (but see the work the  
neverblock guys have been doing). I don't recall what other database  
drivers do.

Fred

> rails, but JRuby is a definitely better option today with the latest
> rails.
>



> -
> Maurício Linhares
> http://alinhavado.wordpress.com/ (pt-br) | http:// 
> blog.codevader.com/ (en)
> João Pessoa, PB, +55 83 8867-7208
>
>
>
> On Wed, Oct 29, 2008 at 12:26 PM, michael_teter <[EMAIL PROTECTED] 
> > wrote:
>>
>> I don't know how practical this is, but I can envision a system
>> whereby each process wraps a request/response with a Start End  
>> message
>> to a load balancer so it will know which processes are busy and which
>> are not.  Further, the load balancer could keep statistics that might
>> be useful in optimizing the balance behavior.
>>
>>> Yup that's the way it is. load balancing across several mongrels  
>>> helps
>>> a bit, but not massively because most load balancers just spread the
>>> load equally - they don't prioritize mongrels that aren't  
>>> processing a
>>> request.
>>> Rails 2.2 is thread safe, but MRI's less than stellar threading  
>>> means
>>> that won't make a lot of difference if you are using MRI. For jruby
>>> things could get very interesting.
>>>
>>> Fred
>>>
>>>> Secondly, for what it's worth, I'm running a mongrel cluster, but  
>>>> that
>>>> isn't helping right now.
>>>
>>>> More info:
>>>
>>>> "top" shows the host machine completely idle.
>>>> development.log shows only user A's query SQL, but it does not show
>>>> user B's request for a new page.
>>>> When user A's query finally completes, then suddenly Rails comes  
>>>> back
>>>> to life, and user B gets a response.
>>>
>>>> This is a serious problem for me right now.  It must be a
>>>> configuration problem, because there's no way Rails is designed to
>>>> behave this way...?
>>>
>>>> Oh also, the database is hosted on another machine, and it's  
>>>> Oracle 9.
>>>
>>>> Thanks!
>>>> Michael
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to