| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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
| |||
| |||
| On Wed, Aug 27, 2008 at 5:15 AM, Timothy Partee <perl-dev@furcen.org> 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 |
|
#3
| |||
| |||
| Perrin Harkins wrote: > 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. Yeah were definitely missing the that APR::* XS glue for this, but its something I'm incredibly interested in. I just lack the time atm.... I think some other things would have to be solved first too. For instance we really only wrap apr v0.9 and they're up to 1.3.3. This should be loads of 'fun' to fix. [snipped Perrin's comments which are valid] -- ------------------------------------------------------------------------ Philip M. Gollucci (philip@ridecharge.com) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.