perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Morgan <>
Subject Re: Apache::DBI "connection lost contact" error
Date Mon, 03 Jun 2013 21:36:16 GMT
On 06/03/2013 03:14 PM, Perrin Harkins wrote:
> On Monday, June 3, 2013, Xinhuan Zheng wrote:
>  > What is the check to see if the server is restarting? Is that new child processes

I always found the best way to run/test Apache::DBI was to run a mod-perl enabled http server
without Apache::DBI.
Test, let the webserver go idle, do not shutdown, check for live connections to the database.
If any, you are doing it wrong :)
Each request should create and destroy 1 database connection (or less)

Once there are no hanging connections, ever, implement Apache::DBI as a simple use statement.
You have accomplished 90% of what is possible.

In today's modern world there are better solutions that can be controlled by the developer.
DBIx::Connector being the most common I believe

DO NOT USE Apache::DBI with DBI::Connector or any other database caching technique. This requires
knowledge of the code!!!

As an administrator I still rely and depend on Apache::DBI, even if it is unsupported.
The only issue I have ever encountered is needing a specific version to talk to an Oracle
8 database
Or where it is caching a cached handle I think is in the cache, I think, please let us not
do this anymore.......


Dave Morgan
Senior Consultant, 1001111 Alberta Limited
403 399 2442

View raw message