Apache2-Controller
view release on metacpan or search on metacpan
lib/Apache2/Controller/DBI/Connector.pm view on Meta::CPAN
To solve this you need to set your database handle idle timeout
to some small number of seconds, say 5 or 10. Then you load
L<Apache::DBI> in your Apache config file so they automatically
get reconnected if needed.
Then when you get a load increase, handles are connected that persist
across requests long enough to handle the next request, but during
idle times, your database server conserves resources.
There are various formulas for determining how much memory is
needed for the maximum number of connections your database server
provides. MySQL has a formula in their docs somewhere to calculate
memory needed for InnoDB handles. It is weird.
When using
persistent database connections, it's a good idea to limit the
max number of Apache children to the max number of database connections
that your server can provide. Find a formula from your vendor's
documentation, if one exists, or wing it.
=cut
use strict;
use warnings FATAL => 'all';
use English '-no_match_vars';
use base qw(
Apache2::Controller::NonResponseBase
( run in 0.501 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )