Re: how to debug when server hangs?
Shugo Maeda <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hi, At Thu, 22 Jan 2004 16:34:30 -0800 (PST), Alan Bram <[email protected]> wrote: > Occasionally, as I'm developing new Ruby code in my .rhtml page, the > server hangs indefinitely when I try to request a page. I'm sure it's > because of my own bug, but how can I begin to debug this? > > The only way I know of is to restart the whole Apache server, comment > out half my new code at a time, and in a kind of binary search, > eventually figure out what's causing the problem. And that, of > course, is only in the case where it's repeatable; sometimes I get a > Heisen-bug that just shows up once in a while. > > Is there any other way? You can attach gdb to the apache process that hanged, but it may be hard to recognize the behaviour of the ruby interpreter. Shugo