perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Schueler <jschue...@eloquency.com>
Subject Re: Apache::DBI "connection lost contact" error
Date Thu, 30 May 2013 12:31:04 GMT
Did this solve your problem?

  -Jim

On Wed, 29 May 2013, Perrin Harkins wrote:

> Hi,
> Apache::DBI is supposed to skip caching if you connect during startup.  You
> should just need to disconnect your database handle after you finish with
> it.  It sounds like you're opening it and then leaving it open.
> 
> - Perrin
> 
> 
> On Wed, May 29, 2013 at 3:24 PM, Xinhuan Zheng <xzheng@christianbook.com>
> wrote:
>       Hi,
> 
> I have apache 2.2.23 statically compiled with mod_perl2 (prefork).
> perl binary is 5.10.1. In startup.pl file there is call
> Apache::DBI->connect_on_init.
> 
> <code>
> use Apache::DBI;
> Apache::DBI->connect_on_init( $DB_DRIVER, $DB_USER, $DB_PASSWORD );
> 
> use DBI;
> </code>
> 
> I need to call DBI->connect to load some data during server startup
> stage. There is problem with this setup. Whenever apachectl
> startup/shutdown, we got connection error like this:
> 
> DBD::Oracle::db DESTROY failed: ORA-03135: connection lost contact
> Process ID: 0
> Session ID: 3252 Serial number: 15131 (DBD ERROR: OCISessionEnd) at
> /usr/local/lib/perl5/site_perl/5.10.1/Apache/DBI.pm line 228.
> 
> I am trying to fix this error. I think it's related to DBI->connect
> in startup.pl. My question is:
>  1. How do I accomplish loading data into database during server
>     startup using Apache::DBI?  
>  2. Once data is loaded during server startup, how do I safely destroy
>     this database handle but not affect the children instantiate their
>     database handles?
> Thanks in advance,
> 
> Xinhuan
> 
> 
> 
>
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message