[Mongrel] Mongrel woes fixed

Zed A. Shaw zedshaw at zedshaw.com
Wed Oct 4 19:34:22 EDT 2006

On Wed, 04 Oct 2006 14:50:19 -0700
Steven Lumos <steven at lumos.us> wrote:

> "Zed A. Shaw" <zedshaw at zedshaw.com> writes:
> > On Sun, 1 Oct 2006 21:38:12 +0200
> > Jacob Atzen <jacob at jacobatzen.dk> wrote:
> >
> > Ok, is there a way to fix this without having people backpatch their
> > ruby?  Also, why were you the only one having this problem?  I'd
> > like to know how the error is caused if you could explain it.
> He's definitely not the only one having this problem.  I've been
> working on it too as I've had time.  I--and possibly others--have been
> wasting time with USR1 trying to figure out what *my* code must have
> been doing wrong.  Once I realized that wasn't helping, I had got as
> far as commenting out the sleeper thread so that I could get a useful
> backtrace, but then it looked like it my query that was hanging.  I
> see now that I was stupidly glossing over the most important frame.
> thread.rb:100:in `lock'
> oci8.rb:126:in `do_ocicall'
> oci8.rb:232:in `commit'
> (eval):3:in `commit'
> active_record/connection_adapters/oracle_adapter.rb:295:in `commit_db_transaction'
> active_record/connection_adapters/abstract/database_stateme ...
> For people who have this problem, the commonality is likely to be (1)
> the Oracle adapter, (2) actions that create threads.  If other (mysql)
> adapters don't use threads then that may explain it.

Ah, but I'm wondering if there's a possible deadlock in oci8.rb when it does that lock call.  Ruby's supposed to detect those.  Also, if the oci8 driver is kicking up threads to do its requests, and it isn't cleaning them out, then you'll quickly run out of file descriptors.  Are you also seeing tons of connections to your oracle db?  Like one per request?

Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

More information about the Mongrel-users mailing list