Hello, I got this newbye problem : 1 method is very long to process and CPU consuming. So, i want to add a progress bar. But when i call this heavy method, then the entire rails application is frozen until it finished. So the ajax call for progression status does not get any response from the server until the method is finished... I tryed with Webrick and Apache + mod_scgi with the same result. Is there a way to make it multi thread to process multiple requests in the same time ? Does i have to create a cluster or a kind of ruby worker pool to handle several requests in the same time ? Is there a way to ''renice'' a method ? Am i missing somethings ? Any ideas is welcome :-) Thank you in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rails is not thread safe so your choices are multiple web server processes or use of something like http://backgroundrb.rubyforge.org/ Michael On Mar 15, 1:30 pm, py <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello, > > I got this newbye problem : > > 1 method is very long to process and CPU consuming. > So, i want to add a progress bar. > > But when i call this heavy method, then the entire rails application is > frozen until it finished. > So the ajax call for progression status does not get any response from > the server until the method is finished... > > I tryed with Webrick and Apache + mod_scgi with the same result. > > Is there a way to make it multi thread to process multiple requests in > the same time ? > Does i have to create a cluster or a kind of ruby worker pool to handle > several requests in the same time ? > Is there a way to ''renice'' a method ? > > Am i missing somethings ? > > Any ideas is welcome :-) > > Thank you in advance > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MichaelLatta wrote:> Rails is not thread safe so your choices are multiple web server > processes or use of something like http://backgroundrb.rubyforge.org/ > > MichaelThank you Michael, Will Rails be thread safe one day ? This basic feature is really missing to me... py -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---