Perrin, I never received your mail (actually, I hardly receive any mails form
this list) I have to go to the archives to see if I've received any replies or
to see what's been posted in general!!
So, in answer to your questions ........
P. May I ask why you're using a threaded MPM? Unless you're running on
Windows, you should probably avoid it. The threaded MPM uses a lot
more memory than the prefork one.
A. This version of MP has just been installed and we have a dept. that deals
with this sort of thing. It's not until we had a problem,
that I started to look into versions of s/w etc. It's a big company
and the admin dept. decide what to install. (I've since asked for the
prefork mpm to be installed)
P. (regarding using Thread::Sociable and threads::shared)
They won't work because DBD modules carry around XS structures which
don't know anything about perl threads. That's the problem DBI::Pool
was trying to address.
A. After I started looking into this issue, I quickly realised that
these wouldn't help me.
P. Can you explain a little more about what the problem is and why you
think it involves Apache::DBI?
A. We recently went live with a DB application and the system ground
to a halt. It could be due to many things, but the thing I'm looking at
is the fact that we had many network connections. I then found the
info about Databases and threaded MPM. From what I understand,
DB connections created at server startup are not shared amongst
threads.
As I see now, threaded MPM doesn't sit well with DB and really, we shouldn't be
using it at all. I've made this clear to my admin dept. and we're going to
install and test prefork MPM.
Thanks for getting back to me, anyway.
-Ants
Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
On Jul 9, 2007, at 9:12 AM, Anthony Gardner wrote:
> http://perl.apache.org/docs/2.0/user/performance/
> mpm.html#Work_with_DataBases_under_Threaded_MPM
>
> I'm looking into a problem we're experiencing (lots of netword
> connections) and I think the answer lies with Apache::DBI and the
> version of mod_perl we're using.
>
> A few questions, does anyone know of the state of DBI::Pool?
>
> If anyone is using threaded MPM and Apache::DBI, how are they
> dealing with sharing the the connection within the threads?
>
> I'm looking at Thread::Sociable (preference) and threads::shared and
>
> I'm looking for tips and/or defacto stds used at the time of writing.
> Any tips would be great while I continue playing with threads and
> searching for other info.
Some people here ( not including me though ) are using connect_cached
in DBI , and bypassing Apache::DBI altogether. you might want to try
that.
correct me if i'm wrong.. but i believe you want to not share dbi
connections between threads. wouldn't you need a factory class to
toss you a fresh connect ?
if you want to do true connection pooling, you'd be best off with
something like sqlrelay or pgpool. the apache::dbi/dbi cached don't
really pool; they just override connects for established connections
on their process and reuse them. things like sqlrelay/pgpool will
let you use 50 db connections for 150 server processes ( by blocking
a lot, yes )
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| Founder/CTO/CVO
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
---------------------------------
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your freeaccount today.