> 
> how about some case-specific information about your request:

The reason why I was thinking about a bd pool was because my application, 
a CMS system, runs in prefork on Linux qw(mp2 apache2.2). If I allow a 
maximum of 30 forks and I host 10 sites which all have their own database 
I have 300 connections open ( maximum but it can happen ).

I use Mysql as my DB, now I have raised the max_connections parameter ( 
which is default at 100 ) to 500 which is the lower maximum.

>From te Mysql doc:
'Linux or Solaris should be able to support 500-1000 simultaneous 
connections, depending on how much RAM you have and what your clients are 
doing.'

So if I host 20 sites I can reach 600 connections and with more sites I 
like to run more forks, there is the snowball and how big can it get.

If you run many sites not all sites use their db connection, only the 
ones who take all the connections and are responsible for the extra 
forking. The idea was to use a db pool so only the sites that actually 
are used take from the pool of connections.

I already use the Forndend-MPM-backend-Prefork Apache setup to save my 
expensive modperl enabled Apache from a lot of static content work.


>       why exactly do you want a pool of db handles, vs additional db  
> connections ?
>       what db are you using ?

To scale the system a bit more I can use a second DB, use an extra 
prefork apache ( with less forks ) to server the smaller sites or use a 
pool of db connections.

I am investigating the last options and run into the Apache SQL backend 
db pool thing which sounded like the solutions to my problem. 

 
> depending on your design and platform, a dbpool might not be a good  
> idea -- or you could be best-off with a middleware dbpool.  for a  
> while i was using pgpool , which is an intermediary server to pool pg  
> connections.  i had 60 connections to pgpool, and 40 connections from  
> pgpool the db.  but then i got 2 gb more ram, and didn't need it.
> 
> 

Does this sound like a good idea to you in this case ?
Or am I missing somthing here?

At the moment I am typing this I thought of an other option. Which could 
be the easies way. What I could do is to not use Apache::DBI with the 
connect_on_init option. In this case if new fork are created only the 
busy sites make a DB connection. I have to look more deeper in to this to 
sea what the balance extra overhead vs. fewer DB connection is.


------

Thomas den Braber


Reply via email to