[ZODB-Dev] Closing ZODB connection

Dieter Maurer dieter at handshake.de
Thu Oct 30 13:12:49 EST 2003


Antonio Beamud Montero wrote at 2003-10-30 16:26 +0100:
 > I have increased de connection pool and works until reaches the
 > connections limit. 
 > I close a connection when it has terminated, but it seems not closed.
 > I'm very confused with DB, connection and root...
 > 
 > If I close a connection, why I can use the root object? 
 > I don't understand anything... :-(

Maybe, you should read the ZODB3 documentation?

"close" works reliably. Are you sure, your "close" is executed?

You can access "root" even when the connection is closed
because "root" is an independent Python object.
The connection is required only to store changes into the
storage and to fetch on demand objects from the storage.

When you access an object and it needs the connection and
the connection is closed, you will get the error message:
"You should not access a closed connection".
Indeed, this message is right. You should avoid it...

-- 
Dieter



More information about the ZODB-Dev mailing list