Perrin Harkins wrote:
> 
> My point was that Apache::DBI already gives you persistent connections,
> and when people say they want actual pooled connections instead they
> usually don't have a good reason for it.

Let's say that I have 20 customers, each of whom has a database schema
for their data. I have one Apache web server serving all of those
customers. Say that Apache has forked off 20 children. Each of the
customers who connects has to use their own authentication to their own
schema. That means that Apache::DBI is caching 20 different connections
- one per customer. Not only that, but Apache::DBI is caching 20
different connections in each of the 20 processes. Suddenly you've got
400 connections to your database at once! And only 20 can actually be in
use at any one time (one for each Apache childe).

Start adding new customers and new database schemas, and you'll soon
find yourself with more connections than you can handle.

And that's why connection pooling makes sense in some cases.

David

-- 
David E. Wheeler
Software Engineer
Salon Internet                                     ICQ:   15726394
[EMAIL PROTECTED]                                       AIM:   dwTheory

Reply via email to