> That's usually pretty accurate, so I guess it really takes 
> that long on your system.  Try Apache::Request!  Or even one 
> of the lighter CGI modules like CGI_Lite.
> 
> > in my case it means up to 4 connections per process, cause 
> in fact it 
> > is not one module but 2 (input and output) and each needs 
> to handle 2
> different
> > connections.
> 
> If you could reduce that, it would certainly help your 
> application's performance.

You should be able to recude that a fair pile.  Unless you're connecting to
multiple Boxes, via Multiple DBI->connect statements, you should be able to
piggyback all requests to a given DB server down the one connection.

SELECT fields FROM database.tablename ...  I use that a fair bit to avoid
the overhead of keeping an extra connection in Memory.

If it's a function of userids, you should work with your DBA to ensure that
one user account can do what's needed from the pages.  

I really can't imagine that you _need_ to connect to 4 different datasources
in most pages.


> > This would be something I would actually prefer to 
> Apache::DBI, but I 
> > dont know if its possible, but I'll try.  Such a thing 
> would be very 
> > important, especially on slow servers with less ram, where 
> Apache::DBI 
> > opens to many connections in peak-times and leaves the 
> system in a bad 
> > condition ('to many open filehandles')
> 
> I still think you'd be better off just limiting the total 
> number of servers with MaxClients.  Put a reverse proxy in 
> front and you'll offload all the work that doesn't require a 
> database handle.
> 

I agree with Perrin here.  On my systems, the mod_perl processes never have
a "peak time"  where they start openning more connections, since I just
configure Apache to start 110 Processes and never launch more than 110
Processes.  The Database always has 110 connections to it. 

Just about the only time you *can't* use Apache::DBI is if you're
deliberately re-connecting on page load.  Typically the only reason you'd do
this is if you were changing the authentication parameters of the connection
based on the request data.  In that case, Apache::DBI would prove no aid.

If you're getting 'too many open filehandles' it sounds like there's some
additional tuning to do on the OS level.  FreeBSD needs to be tuned to
properly run mod_perl, I suspect you may need to increase the Maxfiles and
Maxfilesperproc (or whatever OS equiv) on your system.

As Perrin says, just limit the number of httpd-Mod_perl processes, offload
any and all text/images which is not request driven to a proxy system.

--A

<<attachment: winmail.dat>>

Reply via email to