Oleg--

I don't know that this will help, but you could try using DBI::Proxy. The
setup would theoretically be as follows: each apache process uses DBI::Proxy
as the client;  each creates a network connection to DBI::ProxyServer, which
creates a few persistent connections to the db server using the
connect_cached method.

I have not tried this myself, but reference is made to it at
http://www.crystaltech.com/perldocs/lib/site/DBD/Proxy.html

For more help, you might try the DBI mailing list at
http://www.symbolstone.org/technology/perl/DBI/

good luck

-Ed

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Oleg Bartunov
> Sent: Monday, November 29, 1999 12:00 PM
> To: Leslie Mikesell
> Cc: [EMAIL PROTECTED]
> Subject: Re: pool of DB connections ?
>
>
> On Mon, 29 Nov 1999, Leslie Mikesell wrote:
>
> > Date: Mon, 29 Nov 1999 09:59:38 -0600 (CST)
> > From: Leslie Mikesell <[EMAIL PROTECTED]>
> > To: Oleg Bartunov <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: pool of DB connections ?
> >
> > According to Oleg Bartunov:
> >
> > > I'm using mod_perl, DBI, ApacheDBI and was quite happy
> > > with persistent connections httpd<->postgres until I used
> > > just one database. Currently I have 20 apache servers which
> > > handle 20 connections to database. If I want to work with
> > > another database I have to create another 20 connections
> > > with DB. Postgres is not multithreading
> > > DB, so I will have 40 postgres backends. This is too much.
> > > Any experience ?
> >
> > Try the common trick of using a lightweight non-mod_perl apache
> > as a front end, proxying the program requests to a mod_perl
> > backend on another port.  If your programs live under directory
> > boundaries you can use ProxyPass directives. If they don't you
> > can use RewriteRules with the [p] flag to selectively proxy
> > (or [L] to not proxy).  This will probably allow you to cut
> > the mod_perl httpd's at least in half.  If you still have a
> > problem you could run two back end httpds on different ports
> > with the front end proxying the requests that need each database
> > to separate backends.  Or you can throw hardware at the problem
> > and move the database to a separate machine with enough memory
> > to handle the connections.
>
> I didn't write all details but of course I already have 2 servers setup.
>
>       Regards,
>
>               Oleg
>
> >
> >   Les Mikesell
> >    [EMAIL PROTECTED]
> >
>
> _____________________________________________________________
> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> Sternberg Astronomical Institute, Moscow University (Russia)
> Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
> phone: +007(095)939-16-83, +007(095)939-23-83
>

Reply via email to