Hi. I'm deploying a Rails app via a mongrel cluster. I have some confusion about logging in a mongrel environment. Some of my mongrels seem to be dying unexpectedly. The .pid file is still there, but the process isn't. However, when I look at the mongrel.pid.log file for a mongrel that is no longer running--there's nothing there to indicate why it died. I'm confused as to what output ends up in the mongrel.pid.log vs what ends up in production.log? Can anyone clear up how this works? When I look at the production.log -- I'm not sure if there's anything there to indicate why the mongrel died. There's a whole lot of cruft in the production log! In particular, there seem to be entries for every single HTTP request, along with timing numbers. Is this actually useful to have? Is there any way to turn that kind of logging off? Do I want to? My own logger.info(message) or logger.debug(message) seem to be in production.log too, instead of the mongrel.pid.log. That's to be expected? I sort of expected that logger.info wouldn't be output in a production environment at all! And Rails-produced error messages and deprecation warnings seem to end up in the mongrel.pid.log--why do my own log messages end up in production.log instead? What controls what goes where? Are there ways to fine-tune this more usefully? And in addition to my logging questions, does anyone have any idea why my mongrels might be silently dying? Thanks for any advice, Jonathan
on 2008-01-29 22:21
on 2008-07-09 22:12
Jonathan Rochkind wrote: > And in addition to my logging questions, does anyone have any idea why > my mongrels might be silently dying? > > Thanks for any advice, > > Jonathan I would love to know the answer to this, too, because I'm having the exact same trouble. Anyone know if this has already been answered elsewhere? This is an incredibly frustrating problem. Just some advice on how to log what is going on would be useful.... Thanks, Kris
on 2008-07-09 23:19
tail -f ./current/logs/mongrel.log ? On Wed, Jul 9, 2008 at 1:12 PM, Kristopher Kelly <ruby-forum-incoming@andreas-s.net> wrote: > exact same trouble. Anyone know if this has already been answered > elsewhere? This is an incredibly frustrating problem. Just some advice > on how to log what is going on would be useful.... > > Thanks, > Kris > -- > Posted via http://www.ruby-forum.com/. > > > > -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name
on 2008-07-12 14:23
Jonathan, On Jan 29, 5:21 pm, Jonathan Rochkind <ruby-forum-incom...@andreas- s.net> wrote: > Hi. I'm deploying a Rails app via a mongrel cluster. I have some > confusion about logging in a mongrel environment. If you were using thin of FastCGI the behaviour would be the same. > Some of my mongrels seem to be dying unexpectedly. The .pid file is Check log/production,log for unhandled exceptions. > still there, but the process isn't. However, when I look at the Yes, the PID will be left behind, restarting the process requires cleaning it use: --clean http://paulgoscicki.com/archives/2008/03/mongrel_c... > mongrel.pid.log file for a mongrel that is no longer running--there's > nothing there to indicate why it died. And you won't find it there, go to log/production.log > I'm confused as to what output ends up in the mongrel.pid.log vs what > ends up in production.log? Can anyone clear up how this works? mongrel.pid.log is specific to mongrel internals production.log is used by rails itself, is where the meat is > When I look at the production.log -- I'm not sure if there's anything > there to indicate why the mongrel died. There's a whole lot of cruft in Exceptions, any? $ egrep '(ception|rror)' log/production.log > the production log! In particular, there seem to be entries for every > single HTTP request, along with timing numbers. Is this actually useful Yes, this is the default behaviour of Rails logger. > to have? Is there any way to turn that kind of logging off? Do I want > to? Yes, youcan customize the logger output level to suit you needs, but I find the dfault useful for troubleshooting. > My own logger.info(message) or logger.debug(message) seem to be in > production.log too, instead of the mongrel.pid.log. That's to be > expected? I sort of expected that logger.info wouldn't be output in a Yes, that is fine. > production environment at all! And Rails-produced error messages and In all frameworks/loggers I used, in Java and Ruby, INFO is logged in production environment, it is really useful for troubleshooting or fine tuning the app response times. > deprecation warnings seem to end up in the mongrel.pid.log--why do my Deprecations are thrown by the MRI, not by the Rails app. > own log messages end up in production.log instead? What controls what Because those mesasages are added to the default logger initialized by Rails calling logger.level and this logger is configured to generate the log/MODE.log file. > goes where? Are there ways to fine-tune this more usefully? Sure, I would recommend The Rails Wayf rom Ovie, there you will understand how Rails initializes, its relationship with webserves and logging is also documented there. > And in addition to my logging questions, does anyone have any idea why > my mongrels might be silently dying? Something is going wrong in you Rails app, maybe is a misbehaved library, or code, Do you have a memory leak? Are there exception or error in your logs? What kind of hosting are you using? Shared? VPS? How much memory? How many monmgrels are running? Are you using Monit or God to tace care of the processes? Rails forensics requires a LOT more information. > Thanks for any advice, Best regars and good luck, -- Aníbal Rojas http://hasmanydevelopers.com http://rubycorner.com http://anibal.rojas.com.ve
on 2008-07-13 05:20
Hi,
I have some idea about why mongrel is dying sometimes/most of the
times.
Mongrel can handle the 256 request simultaneously at one time. if
the
incoming request is higher than 256, they have written code inside the *
mongrel.rb* to increase the threads to handle the request. But they
forgot
to initialize the one variable called *'w'*(i'm not sure the exact
variable
name but its one word) so that its not creating the extra threads to
handle
request and its crashing.
mongrel gets crashed becasue of the error this is the exact error :
*unintialized
constant 'w'
*If you want to know about this please look into your log files which is
reside in log folder.
Thanks,
Sathish Kumar Sadhasivam.
On Thu, Jul 10, 2008 at 2:49 AM, Anthony Ettinger <ettinger@gmail.com>
on 2008-07-13 07:27
I wonder if its because my ISP only allows one instance of mongrel per application/proxy I am not able to use mongrel_cluster. On Sat, Jul 12, 2008 at 8:20 PM, sathishkumar <sathishjob@gmail.com> wrote: > mongrel gets crashed becasue of the error this is the exact error : >> >> >> >> > Kris >> 408-656-2473 >> http://anthony.ettinger.name >> >> > > > > > -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name
on 2010-11-26 20:58
hi its seems like you have done a hard work on it. I have got lots of information from your post. Really appreciate your work.!! It was describe very nicely keep us doing good work.. <a href="http://www.dealsourcedirect.com/ion-tape2pc.html/"... Cassette to CD</a> <a href="http://www.dealsourcedirect.com/toy-story-lamp.htm... story lamp</a>
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.