Re: Apache::DBI "connection lost contact" error

Dave Morgan <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
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 spawning?

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.......

YMMV
Dave

-- 
Dave Morgan
Senior Consultant, 1001111 Alberta Limited
[email protected]
403 399 2442
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.