Greg Stark wrote:
> 
>    ***  From dbi-users - To unsubscribe, see the end of this message.  ***
>    *** DBI Home Page - http://www.symbolstone.org/technology/perl/DBI/ ***
> 
> Tim Bunce <[EMAIL PROTECTED]> writes:
> 
> > On Mon, Nov 01, 1999 at 09:01:48PM +0000, Tim Bunce wrote:
> > > Has anyone experienced a situation where a process (httpd for example)
> > > can't reconnect to Oracle after a "shutdown abort"?
> >
> > Thanks for your replies.
> >
> > The problem reported to me which prompted this email has actually
> > proven to be a user script error. The old database handle was being
> > reused, rather than the new one returned from a fresh call to
> > DBI->connect after the shutdown and restart.
> 
> With a web server you always want to reuse the database handle as long as
> possible. That's true of any long-running application though.
> 
> How is the application supposed to know it has been disconnected?
> Maybe the driver should (maybe optionally) automatically reconnect?

That's what the driver handle's ping method is for.

if (!$dbh->ping) { &reconnect; }

-jwb
-- 
Jeffrey W. Baker * [EMAIL PROTECTED]
Critical Path, Inc. * we handle the world's email * www.cp.net
415.808.8807

Reply via email to