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

Hello,

if you are using Fastcgi or Speedycgi instead of mod_perl, what are your options if you want to pool your database connections ?

thanks for any suggestions.

Replies are listed 'Best First'.
Re: Alternatives to Apache::DBI ?
by jeffa (Bishop) on Oct 25, 2003 at 14:57 UTC

    A CPAN search for "database pool" yielded ResourcePool. I haven't tried it yet, and even though the module seems to be written with mod_perl in mind, the docs do mention that it is "useful in stand alone perl applications." Looks like it is worth a test run. You might want to start your RTFM'ing at ResourcePool::BigPicture.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      You should simply use DBI's built-in connect_cached() call instead of connect().
Re: Alternatives to Apache::DBI ?
by runrig (Abbot) on Oct 25, 2003 at 20:05 UTC
    You're always free to roll your own version of Apache::DBI.

    BTW, Apache::DBI does not create pooled connections, but it does create persistent connections.