Hi Fernando, On Fri, 2009-08-21 at 09:49 +0200, Fernando Perez wrote: > My app is still failing. I installed the MemoryLogic plugin to check the > memory usage after each request, but it's stable. > > I noted that it's a single request that locks the app as it doesn't get > printed in the production.log file. Is it possible to debug a live > running Rails app? I looked at LiveConsole but it's only for ruby apps > not rails.
Sorry to hear you haven't gotten this sorted out yet. By way of alternatives, here's a potentially productive debugging approach. Put production logging into debug mode by uncommenting the following line in environment.rb: # config.log_level = :debug Your logs will be much bigger so you'll want to clear them on a daily basis. But do not just delete them. Save them somewhere first. You say "it doesn't get printed in the production.log file". That's ok. My guess is that the problem you're having is almost surely state-related. The next time your app fails, walk the log backwards to figure out what state your app was in just prior to the failure. It's not what we're shooting for, but in general most Rails apps aren't stateless. You can narrow the list of requests that *might* be the problem by figuring out what state the app was in prior to the failure. You're in production mode so I assume you've got multiple users on the system. That means you'll have to sort them out. Write a little script to do that by IP. Then start doing your analysis. Do it on *both* sets of logs: ones where the app failed, but *especially* the ones where the app did *not* fail. Your analysis needs to ask: "what's the difference?" What was each user doing just before the problem. Were all the users in one part of the app? Or did one just do something new while all the rest were doing X and Y ? Debugging a running production app is not impossible, but it's damn close to impossible IME. The best I can suggest is start gathering as much info as possible and doing some heavy analysis to narrow down the possibilities. Best of luck, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

