trac.db.pool

class trac.db.pool.ConnectionPoolBackend(maxsize)

Bases: object

A process-wide LRU-based connection pool.

shutdown(tid=None)

Close pooled connections not used in a while

class trac.db.pool.PooledConnection(pool, cnx, key, tid, log=None)

Bases: trac.db.util.ConnectionWrapper

A database connection that can be pooled. When closed, it gets returned to the pool.

exception trac.db.pool.TimeoutError(message, title=None, show_traceback=False)

Bases: trac.core.TracError

Exception raised by the connection pool when no connection has become available after a given timeout.

If message is an Element object, everything up to the first <p> will be displayed in the red box, and everything after will be displayed below the red box. If title is given, it will be displayed as the large header above the error message.