closing database connections

Ken kenfar42 at yahoo.com
Sat Jan 24 00:03:01 EST 2004


dlee at rightnow.com (dustin lee) wrote in message news:<71fd0ae5.0401230838.309e9b02 at posting.google.com>...
>  I'd be interested to hear if any one has been bitten by not
> explicitly closing database connections and under what cirumstances. 
> My main fear is that I will "run out of" database connections or in
> some other way adversely affect server performance.  I'm using recent
> versions of both mysql and oracle.

Yep, you should definitely and explicitely close database connections.
 Failure to do so can easily leave connections open and resources
locked - not much unlike closing your ssh sessions by killing the
client rather that logging out.

Kind of a coincidence my seeing this email actually - just two minutes
ago I read an email from a team member instructing others on the team
to close their database connections (php/db2) because some connections
occasionally hang and interfere with our loads.


ken



More information about the Python-list mailing list