Dealing with lost database connections

Hamish Lawson <[email protected]> Fri, 22 Jul 2005 01:10:29 +0100
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
It is common to cut down on the cost of opening a database connection
for each request by opening the connection once and reusing it for
subsequent requests (assuming the application is being handled by some
long-running process). However if the database goes temporarily
offline (say for backing up) then the connection may become
invalidated. Before using PyDO I dealt with this by wrapping the
connection in a class that detects such invalidation and creates a new
connection as necessary. How is this situation dealt with when using
PyDO? Given that PyDO creates its own connections, it doesn't seem as
if I can use my previous approach.


Hamish Lawson


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click