Occasionally, my server gets nearly completely unresponsive. Nearly the entire CPU usage is spent in IO wait. I''m forced to kill the ruby processes to get the server back up. The log files are not very useful because the request never finishes so I can''t simply search for requests that took at least x seconds. Are there any tools are techniques to determine what request is currently in progress? I''m running Apache 2.2 and Passenger. Thanks. -- Jack Christensen jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Does it happen on a certain action or when accessing actions in a certain controller? On Sep 11, 4:17 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote:> Occasionally, my server gets nearly completely unresponsive. Nearly the > entire CPU usage is spent in IO wait. I''m forced to kill the ruby > processes to get the server back up. The log files are not very useful > because the request never finishes so I can''t simply search for requests > that took at least x seconds. Are there any tools are techniques to > determine what request is currently in progress? > > I''m running Apache 2.2 and Passenger. > > Thanks. > > -- > Jack Christensen > ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Srdjan Pejic wrote:> Does it happen on a certain action or when accessing actions in a > certain controller? >That''s what I''m trying to find out. The request never finishes so examining the log file is of limited help.> On Sep 11, 4:17 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote: > >> Occasionally, my server gets nearly completely unresponsive. Nearly the >> entire CPU usage is spent in IO wait. I''m forced to kill the ruby >> processes to get the server back up. The log files are not very useful >> because the request never finishes so I can''t simply search for requests >> that took at least x seconds. Are there any tools are techniques to >> determine what request is currently in progress? >> >> I''m running Apache 2.2 and Passenger. >> >> Thanks. >> >> -- >> Jack Christensen >> ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org >> > > > >-- Jack Christensen jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 Thu, Sep 11, 2008 at 2:05 PM, Jack Christensen <jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote:> Does it happen on a certain action or when accessing actions in a > certain controller? > > That''s what I''m trying to find out. The request never finishes so examining > the log file is of limited help.Put logging statements in your controllers and/or look at your DB log(s) (if MySQL, both the query and slow-query logs may be useful). HTH, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry, I wasn''t clear. Does it happen on a certain portion of the site or is it pretty random? Also, is it reproducible in development or is it a production issue? If you''re at your wits end, you could use before_filter to log any and all hits to controllers and actions. If it your code is OK, then the timeouts are happening on the DB server or there''s a communication problem between the app servers and the DB server. HTH On Sep 11, 5:05 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote:> Srdjan Pejic wrote: > > Does it happen on a certain action or when accessing actions in a > > certain controller? > > That''s what I''m trying to find out. The request never finishes so > examining the log file is of limited help. > > > > > On Sep 11, 4:17 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote: > > >> Occasionally, my server gets nearly completely unresponsive. Nearly the > >> entire CPU usage is spent in IO wait. I''m forced to kill the ruby > >> processes to get the server back up. The log files are not very useful > >> because the request never finishes so I can''t simply search for requests > >> that took at least x seconds. Are there any tools are techniques to > >> determine what request is currently in progress? > > >> I''m running Apache 2.2 and Passenger. > > >> Thanks. > > >> -- > >> Jack Christensen > >> ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org > > -- > Jack Christensen > ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Srdjan Pejic wrote:> Sorry, I wasn''t clear. Does it happen on a certain portion of the site > or is it pretty random? Also, is it reproducible in development or is > it a production issue? If you''re at your wits end, you could use > before_filter to log any and all hits to controllers and actions. If > it your code is OK, then the timeouts are happening on the DB server > or there''s a communication problem between the app servers and the DB > server. >It has only happened in production and I haven''t been able to duplicate it. I may go weeks or more without any issues and then have several slowdowns/lockups in a few days. Extra logging might do the trick. Hmmm. I could add a database table with PID, controller, action, and start time. In the before_filter log the action completed and in an after_filter mark it completed or delete it. When it locks up I could just look in the database for incomplete actions. Might be worth a try.> HTH > > On Sep 11, 5:05 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote: > >> Srdjan Pejic wrote: >> >>> Does it happen on a certain action or when accessing actions in a >>> certain controller? >>> >> That''s what I''m trying to find out. The request never finishes so >> examining the log file is of limited help. >> >> >> >> >>> On Sep 11, 4:17 pm, Jack Christensen <ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org> wrote: >>> >>>> Occasionally, my server gets nearly completely unresponsive. Nearly the >>>> entire CPU usage is spent in IO wait. I''m forced to kill the ruby >>>> processes to get the server back up. The log files are not very useful >>>> because the request never finishes so I can''t simply search for requests >>>> that took at least x seconds. Are there any tools are techniques to >>>> determine what request is currently in progress? >>>> >>>> I''m running Apache 2.2 and Passenger. >>>> >>>> Thanks. >>>> >>>> -- >>>> Jack Christensen >>>> ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org >>>> >> -- >> Jack Christensen >> ja...-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org >> > > > >-- Jack Christensen jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---