[Mongrel] Debugging high CPU with Mongrel
Zed A. Shaw
zedshaw at zedshaw.com
Fri Dec 15 17:00:17 EST 2006
On Fri, 15 Dec 2006 12:36:47 -0500
"Dallas DeVries" <dallas.devries at gmail.com> wrote:
> Alright so I got fastthread installed yesterday. Unfortunately the massive
> load spike happened again (until rails cache was deleted of course). I'm
> just wondering if I'm using killall -USR1 mongrel_rails the proper way.
> What sort of messages should I be looking for? They are suppose to be in
> mongrel.log right? Other than turning the toggling debugging mode to true I
> don't seem to be getting any extra info in that mongrel.log or
> production.log. Is there some lower level thing I can try? If it really is
> a cache thing and there is a way for me to see it stuck in some process
> loading or building a fragment or something...
If you turn on USR1 and don't see any log messages than most likely it's a problem that isn't triggering one of the exceptions. You're turning it on right, and you should see a little log message saying it's on.
If you've got a process that's "stuck" for some reason, try strace -p PID. Using strace you can see what system calls the process is calling and then see if it's in some loop or something.
Another option--which is more advanced--is to attach to the process with gdb and then interrupt it and step through. I haven't used this yet, but check out Jamis Buck's blog and a few others for handy macros that can dump the Ruby callstack.
> Are the 0.3.19pr items pretty much centered around the MIME type stuff or
> should I try upgrading to that from .18pr?
Yeah, it's MIME that was put into the 0.3.19 and just a few fastthread changes.
Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.awprofessional.com/title/0321483502 -- The Mongrel Book
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
More information about the Mongrel-users