>I end of with 4 DB connections for each web server thread (2 for Authen
>and 2 for Authz). After a short time of inaction (about 30 secs), the
>web server makes a new child, and the 4 DB connections just sit there.
>Useless. And 4 more are created for the new thread.

>Now this is starting to look a little inefficient, and I was wondering
>if anyone who has any experience with this kind of problem could give me
>a few pointers; some different (better) ideas on how to solve the problem.

I had a very similar problem using database authentication, a very useful reply I 
received mentioned extra arguments for the ( not terribly well documented ) 
DBI->connect call

DBI->connect('dbi:mysql:dbname=db','user','pass',
                {attr=>value},
                undef,
                'connect');

This menas that for your authentication connections, Apache::DBI::connect is not used 
as the connect method, but the "vanilla" connect is. So you will not have the (4) 
connections lying around after their use... 

I am assumimg that it is ok to fiddle with setup of the PerlAuth module to make these 
changes...

Finally this will not help you at all with the elapsed time issues surrounding the 
need for 4 connections ... but good luck

Mark

Reply via email to