Is there a solution, for this issue?... i'm using postgres db. As far as i understand what you say, every access to a native library, will be locked and only one thread at a time will access.
On Oct 18, 8:06 pm, Frederick Cheung <frederick.che...@gmail.com> wrote: > On Oct 18, 10:54 pm, German <german.ot...@gmail.com> wrote: > > > The problem is that my app, uses a lot of external partners.. > > connecting with web services, so a single request can take between 2 > > and 8 seconds.. imagine 100 people using my app :S... > > Can you elaborate a bit about this "not multicore" issue? How one > > thread can block the entire interpreter if i have the > > config.threadsafe! on? > > Because MRI's threading isn't great - ruby threads don't map to native > threads. Pure ruby code shouldn't block the entire interpreter but C > stuff can (eg a mysql query). jruby is much better in this respect. > > Fred > > > > > > > On Oct 17, 8:53 pm, Frederick Cheung <frederick.che...@gmail.com> > > wrote: > > > > On Oct 17, 10:28 pm, German <german.ot...@gmail.com> wrote: > > > > > First of all, Thanks frederick fr the fast response! > > > > > I'll been tryint this, i found a BIG incrementation of the > > > > performance. On the other hand, i can't beleibe how this is a feature > > > > that I have to enable, and is not a default. What is the use of a web > > > > application, that can't handle 2 request at the same time? IMO that is > > > > useless. > > > > An awful lot of rails applications seem to get along just fine > > > (especially as MRI's threading means that you don't take advantage of > > > multiple cores, one thread can block the entire VM etc.) > > > > Fred > > > > > There are any concern about this?.. this feature is ready for > > > > production?.. or it is experimental. > > > > > I've read in some places that you must be sure that your code is > > > > thread safe, and that is obvious. Is there any other "problem" with > > > > that feature? > > > > > Thanks > > > > > On Oct 17, 1:32 pm, Frederick Cheung <frederick.che...@gmail.com> > > > > wrote: > > > > > > On Oct 17, 3:20 pm, German <german.ot...@gmail.com> wrote: > > > > > > > It is true that a single Rails App instance can't handle more than 1 > > > > > > request at the same time? > > > > > > It used to be true, but as of 2.2.2 you can turn on thread safe mode. > > > > > How much you benefit depends on what ruby interpreter you use what > > > > > your app does etc. > > > > > > Fred > > > > > > > I've been looking to the passenger solution for this, and the > > > > > > mongrel > > > > > > one, and others, but the solutions, are App pools, ans things like > > > > > > that, but nobody explain this in a right way. I need a direct answer > > > > > > to this question. > > > > > > > I know some workarounds, like clustering or pools, that's not what i > > > > > > want right now. > > > > > > > Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---