mod_perl2 with mod_dbd and Apache2 - modperl

This is a discussion on mod_perl2 with mod_dbd and Apache2 - modperl ; Quick question for the list. I've been scouring Google looking for information on Connection Pooling to MySQL 5.0 in mod_perl2 on Apache2 using mod_dbd or similar, and while I can find docs for configuring mod_dbd in Apache2, and am quite ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: mod_perl2 with mod_dbd and Apache2

  1. mod_perl2 with mod_dbd and Apache2


    Quick question for the list. I've been scouring Google looking for
    information on Connection Pooling to MySQL 5.0 in mod_perl2 on Apache2
    using mod_dbd or similar, and while I can find docs for configuring
    mod_dbd in Apache2, and am quite familiar with mod_perl development, I'm
    unable to find specific examples online for how to code mod_perl to access
    mod_dbd connection pools via APR... Am I completely on the wrong track? Is
    there another more simple way to implement MySQL DBI connection pooling in
    mod_perl?
    I'm running a website that is starting to get enough traffic that
    opening a fresh DB connection via Perl's DBI libs on each request is
    starting to cost me serious time in serving mod_perl pages through
    Apache2, and I'd like to implement connection pooling to improve
    performance. Any suggestions or URLs that could help me get on the right
    track would be muchly appreciated!

    Thanks,

    - Tim Partee


  2. Re: mod_perl2 with mod_dbd and Apache2

    On Wed, Aug 27, 2008 at 5:15 AM, Timothy Partee wrote:
    > Am I completely on the wrong track?


    In my opinion, yes. You'd have to write your own DBI, or a DBD driver
    that talks to mod_dbd. It would not be easy.

    > Is there
    > another more simple way to implement MySQL DBI connection pooling in
    > mod_perl?


    There are a few. You can use DBI::Gofer. A couple of large sites
    already do this. You can read Tim Bunce's presentation on it for
    details of how it reduces your connections.

    You can also use SQL Relay: http://sqlrelay.sourceforge.net/

    > I'm running a website that is starting to get enough traffic that opening
    > a fresh DB connection via Perl's DBI libs on each request is starting to
    > cost me serious time in serving mod_perl pages through Apache2, and I'd like
    > to implement connection pooling to improve performance.


    You're already running a reverse proxy in front of mod_perl, right?
    If not, do that first. It usually cuts the number of persistent
    connections dramatically.

    - Perrin


+ Reply to Thread