[Rails] Re: Database Concurrency Without a Web Server?

Don Stocks
Wed, 12 Jul 2006 21:46:35 -0000

Isak Hansen wrote:

> You''re sure (lack of) connection pooling is where your problem is
> really at? Keep in mind that one connection is all you''ll ever
need
> for a single process.
>
>
> Isak

Nope.  I''m not sure.  I''m just trying to rule it out.  I
don''t know
where the trouble is.

When I saw that the MySQL server only had one client connection I got
suspicious.  I just assumed that Rails'' connection pooling meant that
multiple connections would be used if necessary.  Maybe I''m wrong or
maybe I''m getting confused in the terminology.  Maybe the word
"connection" is being used in a different way between the MySQL and
Rails worlds.

MySQL shows only one client connection with one associated thread.  Is
that all that''s needed for Rails connection pooling?  Will Rails and
the
MySQL client (on Linux) make mulitple / simultaneous / non-blocking db
queries through one MySQL connection when in the script/runner context?
And how does ActiveRecord::Base.allow_concurrency = true affect this
behaviour?

Thanks a ton for the help!  I''ve been working on this for days!

 - Don