From 6a762d463f3d216e01d57ae9616730b04974a23c Mon Sep 17 00:00:00 2001 From: lmitul Date: Tue, 10 Apr 2018 16:50:58 -0700 Subject: [PATCH] Documenting connection pool config settings (#1197) --- docs/administration.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/administration.rst b/docs/administration.rst index 3c0ca457..1d50f280 100644 --- a/docs/administration.rst +++ b/docs/administration.rst @@ -65,6 +65,36 @@ Basic Configuration SQLALCHEMY_DATABASE_URI = 'postgresql://:@:5432/lemur' +.. data:: SQLALCHEMY_POOL_SIZE +:noindex: + + The default connection pool size is 5 for sqlalchemy managed connections. Depending on the number of Lemur instances, + please specify per instance connection pool size. Below is an example to set connection pool size to 10. + + :: + + SQLALCHEMY_POOL_SIZE = 10 + + + .. warning:: +This is an optional setting but important to review and set for optimal database connection usage and for overall database performance. + +.. data:: SQLALCHEMY_MAX_OVERFLOW +:noindex: + + This setting allows to create connections in addition to specified number of connections in pool size. By default, sqlalchemy + allows 10 connections to create in addition to the pool size. This is also an optional setting. If `SQLALCHEMY_POOL_SIZE` and + `SQLALCHEMY_MAX_OVERFLOW` are not speficied then each Lemur instance may create maximum of 15 connections. + + :: + + SQLALCHECK_MAX_OVERFLOW = 0 + + + .. note:: +Specifying the `SQLALCHEMY_MAX_OVERFLOW` to 0 will enforce limit to not create connections above specified pool size. + + .. data:: LEMUR_ALLOW_WEEKEND_EXPIRATION :noindex: