From: Michael Tremer Date: Fri, 21 Jul 2023 15:12:43 +0000 (+0000) Subject: database: Close connections sooner X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d01c72c0deb49bb7e7af604c38cd6e69671f385;p=pbs.git database: Close connections sooner Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/database.py b/src/buildservice/database.py index 8660823e..a6fda988 100644 --- a/src/buildservice/database.py +++ b/src/buildservice/database.py @@ -53,6 +53,12 @@ class Connection(object): # Set limits for min/max connections in the pool min_size=4, max_size=128, + + # Give clients up to one minute to retrieve a connection + timeout=60, + + # Close connections after they have been idle for one minute + max_idle=60, ) def __configure(self, conn):