zerohero has asked for the wisdom of the Perl Monks concerning the following question:

Can anyone recommend a perl module that does Connection Pooling for DBI suitable for use with Apache2? This seems a little tricky because you want a single-shared pool, not one per child process. I'm planning on using this with Mysql, however, I'd think is not relevant due to the DBI abstraction (but then again I haven't looked at the details too closely so it may matter).

Replies are listed 'Best First'.
Re: Apache2, DBI, Connection Pooling
by perrin (Chancellor) on Mar 28, 2009 at 18:54 UTC
    Did you Google this? There are many discussions about it on the mod_perl list. Here's the summary:
    • You normally don't need this, unless your database really can't handle the number of connections it would take to keep them persistent from each process. This is almost never true with MySQL.
    • If you're running mod_perl without a reverse proxy in front of it, do that first. It will probably solve the issue.
    • If you still need to reduce the number of connections after that, look at DBI::Gofer or sql-relay.