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.

  Les Mikesell
   [EMAIL PROTECTED]

Reply via email to