relstorage.adapters.connections – Connection management for the storage layer

Connection management for the storage layer.

class StoreConnectionPool(connmanager)[source]

Bases: object

A thread-safe pool of StoreConnection objects.

Connections are opened on demand; opening a connection on demand does not block.

By default, it will keep around a StoreConnection for every instance of a RelStorage that has ever used one, which ordinarily corresponds to the ZODB Connection pool size. It can be made to keep a smaller (but not larger) number around by setting MAX_STORE_CONNECTIONS_IN_POOL.


Returns a begun, not-None StoreConnection, or raises an exception.

If it raises an exception, the internals are still consistent and no connection is leaked.