Hi, I just set up rails app on TextDrive via lighttpd + mongrel. I followed their instruction(https://help.joyent.com/index.php?pg=kb.page&id=250) and it runs fine. However, a simple action takes long time (about 5 seconds). It takes about same time when refreshed. It''s a simple action like the following. def say render :text => ''Hello'' end It''s on production environment. The log doesn''t show any error and it says like this. Completed in 0.00101 (988 reqs/sec) Then, where is most of the time wasted? More importantly, how can I track it down? Thank you. Sam -- 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 -~----------~----~----~----~------~----~------~--~---
On Jan 2, 2008, at 1:22 PM, Sam Kong wrote:> However, a simple action takes long time (about 5 seconds). > It takes about same time when refreshed.Always or just the first time? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> On Jan 2, 2008, at 1:22 PM, Sam Kong wrote: > >> However, a simple action takes long time (about 5 seconds). >> It takes about same time when refreshed. > > Always or just the first time?Always. Sam -- 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 -~----------~----~----~----~------~----~------~--~---
It sounds like how Rails performs under CGI. Can you go directly to the port mongrel is listening on and compare? On Jan 2, 2008, at 1:28 PM, Sam Kong wrote:> > Steve Ross wrote: >> On Jan 2, 2008, at 1:22 PM, Sam Kong wrote: >> >>> However, a simple action takes long time (about 5 seconds). >>> It takes about same time when refreshed. >> >> Always or just the first time? > > Always. > > Sam > -- > 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 -~----------~----~----~----~------~----~------~--~---
Hi Steve, Steve Ross wrote:> It sounds like how Rails performs under CGI. Can you go directly to > the port mongrel is listening on and compare?When I requested directly to the mongrel port, it took less than 1 sec. The first time took about 3 seconds but later ones responded instantly. How can I fix that? Sam -- 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 -~----------~----~----~----~------~----~------~--~---
I don''t use TextDrive, but perhaps this article will help you: http://wiki.joyent.com/shared:kb:rails-with-mongrel You''re currently running your Rails app through CGI. The mongrel instance is untouched when you make a request through their Apache server. A brand new instance of Ruby, Rails, and your app are loaded up for each request (ugggh) because Apache doesn''t know anything about how it''s supposed to proxy the requests. It''s really easy to proxy from Apache directly to mongrel. On Jan 2, 2008, at 1:33 PM, Sam Kong wrote:> > Hi Steve, > > Steve Ross wrote: >> It sounds like how Rails performs under CGI. Can you go directly to >> the port mongrel is listening on and compare? > > When I requested directly to the mongrel port, it took less than 1 > sec. > The first time took about 3 seconds but later ones responded > instantly. > > How can I fix that? > > Sam > -- > 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 -~----------~----~----~----~------~----~------~--~---